[Flashcoders] Deafening silence on Unicode
Ok, I haven't had a lot of response to my various queries to this list about Unicode issues. Is that because no one here knows anything about it? I'd really appreciate some thoughts on this issue or pointers to any resources, as I'm currently embarking on a major project to completely revamp our software's localisation system and it's not something I want to go into blind. In particular, right now I'm trying to find a way to perform String.fromCharCode() operations using ANSI instead of Unicode, without switching the whole system over to ANSI (as I could do with System.useCodePage) Another issue I've noticed recently: The Flash docs (in the notes on System.useCodePage) talk about external text files being encoded 'as Unicode' but doesn't go into any details. It seems to mean UTF-8, judging by my tests, but can it also deal with UTF-16? UCS? Other encodings? Can it deal with Big-end/little-endian? If so, how does it go about working out which encoding to use to interpret a particular file? Best Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Deafening silence on Unicode
but can it also deal with UTF-16? UCS? Other encodings? Can it deal with Big-end/little-endian? If so, how does it go about working out which encoding to use to interpret a particular file? Flash Player 6 and later looks at BOM when reading text data. If it's 0xFE the data is treated as UTF-16BE, if it's 0xFF then UTF-16LE, and if there's no BOM it will be treated as UTF-8. I don't think Flash can handle any other encodings. Kenneth Kawamoto http://www.materiaprima.co.uk ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Deafening silence on Unicode
but can it also deal with UTF-16? UCS? Other encodings? Can it deal with Big-end/little-endian? If so, how does it go about working out which encoding to use to interpret a particular file? Flash Player 6 and later looks at BOM when reading text data. If it's 0xFE the data is treated as UTF-16BE, if it's 0xFF then UTF-16LE, and if there's no BOM it will be treated as UTF-8. I don't think Flash can handle any other encodings. Thanks, that makes sense. So what about strings? If my swf has a string of, say, an aleph character, and it's embedded in Director, and it passes that string back to Director as the result of a function, how is it sent? How is the Unicode information stored and passed around? What I'm trying to avoid doing, but probably won't be able to, is having to translate all my Unicode strings into numerical arrays of UTF values before sending them out to Director, and vice versa. At the moment my process for reading text in via Director is: Director gets UTF-8 text from the server. It interprets this as a string of 256-bit characters (using ANSI and the system codepage) Director translates this into an array of integers using charToNum() Director sends this array to Flash Flash translates the integers back into a string using my own UTF-8 decoder function. This is ugly as all hell and I'm trying to simplify it if I can (although currently it's looking like I *may* be able to cut out the Director middleman altogether by getting Flash to talk to the server directly. I thought this wasn't going to be possible but it's looking like we may be able to do it after all) Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Deafening silence on Unicode
I *may* be able to cut out the Director middleman altogether by getting Flash to talk to the server directly. That's how I would do it, Danny. I am also waiting for Director 11 with Unicode, although no one actually said Director 11 will support Unicode - I am just hoping if I kept saying it will actually happen. I personally don't deal with any Unicode data in Director but only within embedded Flash. I know some people have done that though: go to Direct-L and post your question there. Kenneth Kawamoto http://www.materiaprima.co.uk ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Deafening silence on Unicode
I *may* be able to cut out the Director middleman altogether by getting Flash to talk to the server directly. That's how I would do it, Danny. I'd have done it already if I thought I could ;) There's an awful lot of unhooking data from one place and putting it somewhere else in this project. I'm actually drawing UML diagrams, which I've *never* done before. I am also waiting for Director 11 with Unicode, although no one actually said Director 11 will support Unicode - I am just hoping if I kept saying it will actually happen. I'm pretty sure it will - there have been definite hints in that direction. Which is frustrating, because that'll make all the work I'm doing now pretty much redundant, sigh. Hooray for Macromedia's release date secrecy. I personally don't deal with any Unicode data in Director but only within embedded Flash. Yes, that's what we're trying to achieve at the moment. Unfortunately there's at least one place where that won't be possible, which is saving of external files, so in at least one place I'll have to jump through these hoops. But yes, it does look like in this particular instance I'll be able to avoid the problem. Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com