10 Replies Latest reply on Jul 22, 2009 10:51 AM by acath

    MXML files are in ANSI


      I just noticed that MXML files generated by Flash Catalyst are encoded in ANSI, not Unicode.

      It might be a problem for languages like chinese.



        • 1. Re: MXML files are in ANSI
          acath Level 4

          How are you detecting this? Has it created a problem? We do test extensively using non-Latin characters...



          • 2. Re: MXML files are in ANSI
            Thaneros Level 1

            I created a project in FC and added a button. Then I opened a MXML file in Notepad. If you click File-Save as..., you can see the selected encoding is ANSI.

            Then if you copy some chinese characters (still in Notepad) and save, you will have a warning saying Unicode characters will be lost. If you proceed and reopen the file, the chinese characters are effectively lost.

            • 3. Re: MXML files are in ANSI
              acath Level 4



              How did you open the MXML file in Notepad? Catalyst creates an FXP file...the MXML files are hidden in a temp directory. Did you unzip the FXP file directly? Or did you import into Flash Builder first? When I import into Flash Builder, the MXML files are UTF-8 encoded.



              • 4. Re: MXML files are in ANSI
                njadobe2 Adobe Employee

                Hi there,


                I think this might be specifically an issue with Notepad. As far as I know, Notepad doesn't know how to read the <?xml...?> directive at the top of XML files to determine the proper encoding for a file. So, if you open a file in Notepad that doesn't happen to have any special characters in it, it will always assume it's ANSI regardless of the encoding specified at the top. If you then add special/double-byte characters, they will get corrupted on save.


                In general, when editing XML files it's safest to edit them in an editor that's aware of XML conventions.





                • 5. Re: MXML files are in ANSI
                  Thaneros Level 1

                  What I did is open the CODE view, then right click on mxml file and select Open With System Editor.


                  Maybe files are in ANSI because languages other than latin-based are not supported.


                  I will wait for the next beta to see what has changed.

                  • 6. Re: MXML files are in ANSI
                    acath Level 4

                    Ok, thanks for the detail. As NJ said, I think the issue you're seeing is specific to Notepad. Also, that "Open with system editor" choice isn't even supposed to be there...it's a bug.


                    Other languages are definitely supported. Try it - add some text and change it to be some Chinese or Arabic characters. Then go to code view - they're still there.



                    • 7. Re: MXML files are in ANSI
                      Thaneros Level 1

                      I am sorry Adam, but typing in Chinese doesn't work.

                      I tried in the design view and in the code view. It doesn't work in both. All that it types is latin characters.

                      For me, typing chinese characters in the beta 1 is not supported.

                      • 8. Re: MXML files are in ANSI
                        acath Level 4

                        Aha, now I understand! This is a much more serious problem than the encoding of the file when you open it in Notepad!


                        Can you try these steps and tell me what happens:



                        1.  Create a new Catalyst project

                        2.  Go to the Text tool and add a text box

                        3.  In the properties panel, start typing in the the "Text" property.

                        4.  Type some Chinese characters in there.


                        That should work. What happens for you? Do they just not show up?


                        Which version of Windows are you on? What is your OS's locale?




                        • 9. Re: MXML files are in ANSI
                          Thaneros Level 1

                          It doesn't work for me.

                          When I want to type a chinese character, for example "你", I have to type on 's', 'u' then '3' keys and my chinese character will appear. But in FC, in the Text property, "su3" will appear instead of "你".


                          I am on Windows XP Profesionnal Version 2002 SP3 English version.

                          I attached screen shots of my regional settings.

                          My FC version is Beta 1 - 235712

                          • 10. Re: MXML files are in ANSI
                            acath Level 4

                            That may be a problem with our text input component on Windows. I’ll get back to you on this one...


                            Thank you for repeatedly giving me more detail. I definitely want to get to the bottom of this.