spidermonkey is built without UTF-8 support by default. Here is a new ebuild and patch to add support to the existing spidermonkey-1.7.0 ebuild. Reproducible: Always
Created attachment 197829 [details] spidermonkey-1.7.0 with utf-8 support
Created attachment 197831 [details] UTF-8 patch
Hmm why do you use the nls useflag? Shouldnt it be unicode? What about a simpler change like: use unicode && append-cppflags -DJS_C_STRINGS_ARE_UTF8 ? Does it work for you?
Thanks for the feedback. Sorry about the wrong approach with this ebuild. With a severe lack of consistency, and readable documentation, I'm not ever sure what the latest trend in ebuilds is. Numerous packages in the tree use nls as the use flag for utf8 support. I will change to unicode. I've never seen the append-cppflags ... glad to know it exists. Also, can you cite where I might read on what the current use flag policy is? And if it isn't too much trouble, why other gentoo devs don't follow the policy? I would be more likely to provide higher quality patches and more ebuilds if there was a clear expectation of what I should provide, and actual documentation for classes with valid working examples. In the past, I would have just asked for utf-8 support to be added, and expect that it had a good chance of happening. Now, I do it myself, provide what I did and wait for someone to maybe add the functionality. I find it frustrating and disappointing to just to get feedback about how I did it wrong. Maybe the better approach would be to fix all the multitudes of incorrectly written ebuilds in the tree so I had good working examples to begin with. I know I'll never make it into your private club, but I do use Gentoo, and would like to contribute if that's even possible currently.
(In reply to comment #4) > Sorry about the wrong approach with this ebuild. With a severe lack of > consistency, and readable documentation, I'm not ever sure what the latest > trend in ebuilds is. Numerous packages in the tree use nls as the use flag for > utf8 support. I will change to unicode. There is no absolute rule, have a look at profiles/use.desc: nls - Adds Native Language Support (using gettext - GNU locale utilities) unicode - Adds support for Unicode For me the change you propose adds unicode support and is not about adding translation support. Packages using nls only for unicode support is probably a poorly chosen useflag. > I've never seen the append-cppflags ... > glad to know it exists. Its in flag-o-matic eclass; you can emerge eclass-manpages and use 'man flag-o-matic.eclass'. After testing it's probably better to use 'append-flags' instead of 'append-cppflags' (the former should work while the latter doesn't appear to). > Also, can you cite where I might read on what the current use flag policy is? I don't know where its written but for me it's the implicit common sense policy: 'choose the one that fits best for what it does' :) > And if it isn't too much trouble, why other gentoo devs don't follow the > policy? Heh, don't ask me :) I suppose poorly chosen useflag names are bugs that should be reported. Wrt nls vs unicode, be sure it is really unicode only and not 'nls and unicode' support that is added to the package. > In the past, I would have just asked for utf-8 support to be added, and expect > that it had a good chance of happening. Now, I do it myself, provide what I did > and wait for someone to maybe add the functionality. I find it frustrating and > disappointing to just to get feedback about how I did it wrong. Don't be disappointed, the idea here is more educationnal than anything else: You provide patches, people review it, give feedback on how it could be improved, you improve it and then its merged as is. From a one time commit perspective I could have changed it myself and committed it but you wouldn't have known about the append-flags stuff for example. Next time there may or may not be comments about your contributions, and maybe some day you'll be bored of having to wait on devs to review your changes, make the step and start becoming a dev yourself, with all what you'll have learned the recruiting quizzes will be easy and voila!
The suggestions in #3 do work, there's no need to patch the makefile. Also, no need to depend on libintl, all the define is doing here is changing some of the string handling routines to support UTF-8 sequences. Relevant upstream discussion about this define: https://bugzilla.mozilla.org/show_bug.cgi?id=397215
Created attachment 220263 [details] Simpler method of enabling UTF8 strings
Any update on this bug? I'd like to add mongodb in #273259 but I need this bug fixed first. I can go ahead and make the change if I don't hear back from you in a few weeks. Thanks!
*spidermonkey-1.7.0-r1 (07 Mar 2010) 07 Mar 2010; Lance Albertson <ramereth@gentoo.org> +spidermonkey-1.7.0-r1.ebuild: Add unicode support fixing #277697 Going ahead and fixing it myself per the request from aballier via IRC.