Re: [Audacity-devel] XML charset bug fixed
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Dave F. <dav...@co...> - 2003-09-15 06:05:30
|
On Sunday 14 September 2003 10:01 pm, Dominic Mazzoni wrote: > I've been struggling with this for a while and my head is still > spinning. Which encoding you need depends on the API. wxMac > uses an 8-bit encoding internally, which I'm still pretty sure > is supposed to be MacRoman, since that was the only possibility > under Mac OS 9. That's also the encoding expected by many > Carbon API functions. But the BSD level expects UTF-8, and > there's no code in wxMac to handle that conversion. I thought I'd spend a little time with this since I've looked at this same problem in the past. I found this post on the pgadmin list saying that they use wxMac 2.5 for Unicode support. I think I read a previous post here from Dominic saying that you guys use wxMac 2.5 too? If not, it might be worth trying out. (I don't have a Mac, else I'd test it and see what happens) http://archives.postgresql.org/pgadmin-hackers/2003-06/msg00430.php I read another post somewhere else (I lost the link already, sorry, I can try to find it if you guys want to read the original post) which had a small reference to unicode and wxMac. Apparently wxUSE_UNICODE 1 only works for carbon builds (?). There seemed to be an indication that you have to use CodeWarrior to compile it, but I may be mistaken. I don't know jack about Mac. :) I know everybody hates to deal with Mozilla code, but Mozilla did put out some standalone string classes to deal with Unicode. It seems like you might have to really hack the wxMac port to be able to use them, but the library is small and easy-to-use by itself. http://www.mozilla.org/projects/xpcom/string-guide.html At this time, it might be worth considering moving away from wxString, actually. Either that or just not supporting unicode on Mac until wxWindows supports it in a stable fashion. How much work would be involved in changing audacity to use a different string class internally? I know the GUI stuff will still expect wxString, but a functor could easily be written to handle the conversion when it's needed.... Dave > - Dominic > > Matt Brubeck wrote: > >>It turns out that although wxMac doesn't seem to have this set, the > >>proper encoding when using Unix functions on the Mac is UTF-8. ... > >> > >>Unfortunately the string that comes back from a wxFileDialog is > >>MacRoman - the default Mac encoding. > > > > Wow, that's annoying... > > > > Have you verified that the 8-bit strings are returned in MacRoman (e.g. > > lowercase u-umlaut is character 159)? > > > >>Matt, any ideas? > > > > I would ask on the wx lists for advice about MacRoman strings and > > conversion. I wasn't able to find anything useful in the list archives > > or documentation. > > > > Mac OS X has its own character-set conversion APIs, which we can > > probably use directly until the necessary code is integrated into wx. > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Audacity-devel mailing list > > Aud...@li... > > https://lists.sourceforge.net/lists/listinfo/audacity-devel > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Audacity-devel mailing list > Aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel -- "Refuse to be denied, refuse to compromise "Your ideology always a lie "Imperialistic, colonialistic "Bandwagon patriot wake up to this" -Anthrax, "Refuse to be denied" |