Announcement

Collapse
No announcement yet.

The final word on unicode

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • The final word on unicode

    Hi guys

    I noticed that the topic of unicode support in Winamp 5 has been mentionned.

    Just so that the matter is settled (and to be clear, I'm not writing this to debate *about* unicode), there is no support of unicode coming up in Winamp 5. That's it. End of story.

    So some of you may bring this up :



    or this :



    and say, "to do this, it must be supporting unicode!".

    Well no, what you see here are captures I have made of the freeform skinning rendering by itself (as in: not using Win32's DrawText functions) the default charset for an operating system set to japanese or hebrew. Support for showing the correct international strings in the default language selected in the "regional settings" box of Windows is *not* unicode support. What unicode support allows you to do is to display these strings even if your Windows default os language is set to english. Mixing up japanese AND hebrew in the same program is a feature of unicode. Windows explorer, for instance, can do it, so does Internet Explorer, as long as you have the language installed (but not necessarilly set as default).

    This means that, as it has been since a long time in Winamp 2, Winamp 5 can display strings in japanese or in hebrew (freeform skins couldn't previously do it, hence my captures, which I have slightly regreted making since), so long as your Windows is set to japanese or hebrew as your default language.

    The reason for this has to do with the size of character strings: if you use 8bit character strings to encode text (what Winamp 2 has been doing since the beginning), you must observe an encoding scheme (even if you do not know about it and just take all chars to simply be 0...255), and there is no way to detect an encoding scheme from a given encoded string (it's just random bytes, it could just be ascii after all, ie: no encoding at all), the operating system needs to know *somehow* in what encoding you are when it wants to print the string, so that it knows wether this code is rather an accented e in french, or a 'ia' in russian (i'm making this correspondance up, btw) and so that it can print the correct characters, not just merely ascii. It does this by reading the default language setting in Windows. In 8bits-strings programs, that is being done by the classical Win32 DrawText functions, they do the character decoding on their own, and then print the characters with the requested font (usually unicode charset, but not always, but that's another story). In contrast, when you support unicode internally, there are four bytes to represent each character and these are enough to store all the unicode characters, and there is therefore no need for a notion of character encoding, everything can be in just one native encoding (unicode, in which case the encoding and the charmap 'fuse together' in a sense, or something still 8bits, like UTF-8), and you can stop thinking about it altogether, because all characters in all languages have a unique number. That's what is sometimes called "proper" unicode support.

    Now, to be completely accurate, I must say that the freeform engine has some sort of unicode support, but *in the font rendering engine*, in the sense that, since we cannot rely on DrawText to make the character decoding (decoding to unicode according to the default language set in the system) because we do not use DrawText to draw our fonts (we use Freetype which does not provide the conversion), we have to provide our own conversion of encoded strings to unicode, in order to print the japanese or hebrew characters (we also for instance had to implement our own right-to-left routines). This conversion we provide uses the functions that DrawText uses, and these uses the default language setting to do the decoding, we therefore support japanese and hebrew chatacters only if you have the right language set, we cannot mix the two. True unicode support could.

    Summed up, the reason true unicode support cannot be added simply (as in, just recompile, silly!) in the Winamp 2 system is that it would render our plugins incompatible, since they would have to all be recompiled for unicode support as well.

    There are thoughts being given about what should be done about it, I certainly would be willing, once Winamp 5 is out, to try and make it truly support unicode without breaking everything (ie: supporting legacy encoding, UTF-8 seems to be the key here), but it would certainly be a lengthy task. Perhaps it is worth it.

    Oh and let me be clear again, that's not to start a debate about unicode, if you want to have one amongst yourselves, that's fine, but I won't be participating yes, I have my own view about wether or not it should be undertaken, but we're several in the team, and this is a work that would impact everybody, so unless we all agree that this can be done safely (ie: without breaking winamp2) we probably won't be doing it.

    Francis.
    Bluemars - Music For The Space Traveller

  • #2
    Thanks for the information.
    So, you are saying that Winamp 5 Beta 1 supports Japanese if my default language is set to Japanese in Regional Options? Can I have my region "Your Locale" set to English still?
    -SailorH

    Comment


    • #3
      If what Sailor H says is true, I think mine is already set that way.

      Most program display Jap, normal desktop icons, WinMX, IE but Winamp still needs a font change to do that.

      But I can type Jap into the ID tag window and see Jap characters.
      Thanx

      Comment


      • #4
        I have some russian musics with some non-standard characters. When I open them in winamp5, both in the playlist and the main window in the modern skin or the classic one, I get wrong characters.
        For example, instead of "Dobranotch - ?? ????", I get "Dobranotch - 0 ;CF5". That's very anoying

        Will this ever be supported in winamp5?

        Comment


        • #5
          Summed up, the reason true unicode support cannot be added simply (as in, just recompile, silly!) in the Winamp 2 system is that it would render our plugins incompatible, since they would have to all be recompiled for unicode support as well.
          What drivel. I mean, it's not like looking for a different entrypoint would be impossible.

          Comment


          • #6
            Winamp 2 & 5 won't display japanese characters besides having set the proper locale

            If what Sailor H says is true, I think mine is already set that way.

            Most program display Jap, normal desktop icons, WinMX, IE but Winamp still needs a font change to do that.

            But I can type Jap into the ID tag window and see Jap characters.
            I have exactly the same problem, I have set 'use japanese as the default language for non-unicode programs', and it works fine for the file system, for soulseek and mirc.
            However I can't get Winamp 2 nor Winamp 5 to show japanese characters correctly, any help would be appreciated.

            Best regards.

            Comment


            • #7
              Re: Winamp 2 & 5 won't display japanese characters besides having set the proper loca

              Originally posted by xdcdx
              I have exactly the same problem, I have set 'use japanese as the default language for non-unicode programs', and it works fine for the file system, for soulseek and mirc.
              However I can't get Winamp 2 nor Winamp 5 to show japanese characters correctly, any help would be appreciated.

              Best regards.
              There is an option in Beta 2 to overide (some of the) fonts to replace with international supported fonts. This fixes the problem in some places, but the Playlist still doesn't seem to work. Give it a try, good luck!
              -SailorH

              Comment


              • #8
                Hello,

                Thanks for the help! But it isn't working yet...
                I have downloaded beta 2, and I'm playing with these settings but I can't get it to work properly.
                I select the MS Gothic font, and then the main windows shows some japanese characters, but shows them screwed. On the other hand, for example, I have selected the same MS Gothic font on Total Commander (a windows file manager) and all the names are fine there.
                I think I have tried every combination of the modern skin internationalization options with no results.

                And there's another weird thing, when I select the MS Gothic font, exit from the option screen and enter again, it says I have selected the Wingdings font, but it isn't true, because there aren't wingdings characters in the song name.

                What font are you selecting for winamp ? Does it show the names correctly on the main window ?

                Best regards.
                Attached Files

                Comment


                • #9
                  I have been using MS-PRGothic as my Japanese font. When I open up the options though it always resets to "Larabie Font" even though it is still using MS-PRGothic. I think that is just a bug in the beta.

                  As for why you are getting incorrect Japanese, I've found that some of my files also do not show proper Japanese. There are several ways to encode Japanese text, in EUC, ISO and SJIS modes. This bug might be related to Winamp not recognizing which mode the text is in... I'm not really sure what the deal is though. Hopefully it will be fixed for the next release.
                  -SailorH

                  Comment


                  • #10
                    Originally posted by SailorH
                    I have been using MS-PRGothic as my Japanese font. When I open up the options though it always resets to "Larabie Font" even though it is still using MS-PRGothic. I think that is just a bug in the beta.

                    As for why you are getting incorrect Japanese, I've found that some of my files also do not show proper Japanese. There are several ways to encode Japanese text, in EUC, ISO and SJIS modes. This bug might be related to Winamp not recognizing which mode the text is in... I'm not really sure what the deal is though. Hopefully it will be fixed for the next release.
                    Could you send me your MS-PRGothic font ?
                    If you can upload it to some webspace, that would be great, if not I'll tell you my e-mail in private message.

                    Thanks in advance.

                    [EDIT]
                    Oh, you are right, some files (very few ones actually) show its names correctly!
                    I hope this bug gets fixed soon Also, support for this in the playlist would be great.
                    The font isn't necessary now.
                    Thanks again and best regards.

                    Comment


                    • #11
                      Furthermore, it's very difficult to reconcile both non-Unicode and Unicode builds of the same program, especially when they allow for text manipulation through plugins.

                      To incorporate Unicode, Winamp would likely need to do the following:[list=1][*]Rewrite (or at best heavily rework) all code having to do with string handling (except possibly if they were using UTF-8; there may be less work involved there)[*]Break backwards compatibility to allow newer plugins to work[*]Add bloat knee-deep to allow different plugins to co-exist well[*]Or some combination of the above.[/list=1]

                      Comment


                      • #12
                        Re: The final word on unicode

                        Originally posted by Francis
                        Hi guys

                        I noticed that the topic of unicode support in Winamp 5 has been mentionned.

                        Just so that the matter is settled (and to be clear, I'm not writing this to debate *about* unicode), there is no support of unicode coming up in Winamp 5. That's it. End of story.

                        So some of you may bring this up :



                        or this :



                        and say, "to do this, it must be supporting unicode!".

                        Well no, what you see here are captures I have made of the freeform skinning rendering by itself (as in: not using Win32's DrawText functions) the default charset for an operating system set to japanese or hebrew. Support for showing the correct international strings in the default language selected in the "regional settings" box of Windows is *not* unicode support. What unicode support allows you to do is to display these strings even if your Windows default os language is set to english. Mixing up japanese AND hebrew in the same program is a feature of unicode. Windows explorer, for instance, can do it, so does Internet Explorer, as long as you have the language installed (but not necessarilly set as default).

                        This means that, as it has been since a long time in Winamp 2, Winamp 5 can display strings in japanese or in hebrew (freeform skins couldn't previously do it, hence my captures, which I have slightly regreted making since), so long as your Windows is set to japanese or hebrew as your default language.

                        The reason for this has to do with the size of character strings: if you use 8bit character strings to encode text (what Winamp 2 has been doing since the beginning), you must observe an encoding scheme (even if you do not know about it and just take all chars to simply be 0...255), and there is no way to detect an encoding scheme from a given encoded string (it's just random bytes, it could just be ascii after all, ie: no encoding at all), the operating system needs to know *somehow* in what encoding you are when it wants to print the string, so that it knows wether this code is rather an accented e in french, or a 'ia' in russian (i'm making this correspondance up, btw) and so that it can print the correct characters, not just merely ascii. It does this by reading the default language setting in Windows. In 8bits-strings programs, that is being done by the classical Win32 DrawText functions, they do the character decoding on their own, and then print the characters with the requested font (usually unicode charset, but not always, but that's another story). In contrast, when you support unicode internally, there are four bytes to represent each character and these are enough to store all the unicode characters, and there is therefore no need for a notion of character encoding, everything can be in just one native encoding (unicode, in which case the encoding and the charmap 'fuse together' in a sense, or something still 8bits, like UTF-8), and you can stop thinking about it altogether, because all characters in all languages have a unique number. That's what is sometimes called "proper" unicode support.

                        Now, to be completely accurate, I must say that the freeform engine has some sort of unicode support, but *in the font rendering engine*, in the sense that, since we cannot rely on DrawText to make the character decoding (decoding to unicode according to the default language set in the system) because we do not use DrawText to draw our fonts (we use Freetype which does not provide the conversion), we have to provide our own conversion of encoded strings to unicode, in order to print the japanese or hebrew characters (we also for instance had to implement our own right-to-left routines). This conversion we provide uses the functions that DrawText uses, and these uses the default language setting to do the decoding, we therefore support japanese and hebrew chatacters only if you have the right language set, we cannot mix the two. True unicode support could.

                        Summed up, the reason true unicode support cannot be added simply (as in, just recompile, silly!) in the Winamp 2 system is that it would render our plugins incompatible, since they would have to all be recompiled for unicode support as well.

                        There are thoughts being given about what should be done about it, I certainly would be willing, once Winamp 5 is out, to try and make it truly support unicode without breaking everything (ie: supporting legacy encoding, UTF-8 seems to be the key here), but it would certainly be a lengthy task. Perhaps it is worth it.

                        Oh and let me be clear again, that's not to start a debate about unicode, if you want to have one amongst yourselves, that's fine, but I won't be participating yes, I have my own view about wether or not it should be undertaken, but we're several in the team, and this is a work that would impact everybody, so unless we all agree that this can be done safely (ie: without breaking winamp2) we probably won't be doing it.

                        Francis.
                        *standing ovation*

                        Comment


                        • #13
                          *lol*

                          peter is back. as we like him!
                          eeeee eeeeeee eeeee eeeee eeeee
                          8 8 8 8 8 8 8 8 8 8 88
                          8eee8 8e 8 8 8eee8 8e 8 8 8
                          88 8 88 8 8 88 8 88 8 8 8
                          88 8 88 8 8 88 8 88 8 8eee8

                          Comment


                          • #14
                            Originally posted by amano
                            peter is back
                            I wish

                            Playlist | Twitter | Albums

                            Comment


                            • #15
                              at least back in these forums
                              eeeee eeeeeee eeeee eeeee eeeee
                              8 8 8 8 8 8 8 8 8 8 88
                              8eee8 8e 8 8 8eee8 8e 8 8 8
                              88 8 88 8 8 88 8 88 8 8 8
                              88 8 88 8 8 88 8 88 8 8eee8

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎