Don’t Get Caught with Boxes
If you are a "non-Unicode Kind of Person" like I was just a few short months ago, one of the things that you’ll likely want to do if you want to get into the full features of Tiburon is get your system ready to handle the variety of non-Arabic alphabet fonts that are out there. Many ANSI-type folks probably haven’t installed the Supplemental Language Support for Windows. If you want to be able to view and use Japanese, Chinese, Arabic, and other alphabets in your Code Editor, you’ll need to install that support. if you don’t, you might end up with code that looks like this:
Those boxes are supposed to be Japanese, Chinese, and Russian characters, but since the full language support isn’t installed on the machine where this screen shot was taken, it displays the boxes instead of the actual characters.
It’s pretty easy to add the functionality (though you’ll likely need your OS disc. I know that you carefully saved that DVD when you bought your computer, so this won’t be an issue, right?
).
The steps to add the Supplemental Language support are as follows:
- Open the Control Panel
- Double click on Regional and Language Option
- Go to the "Languages" Tab
- In the "Supplemental Language Support", select either or both checkboxes. Check the first one for Arabic, Armenian, Georgian, Hebrew, Indic, Thai, and Vietnamese, and the second ones for Chinese, Japanese, and Korean.
- Click Ok and Windows will install the files. (Windows will likely ask for your Windows DVD.)
Once you do that, the Tiburon IDE will be more than happy to display all different kinds of languages and alphabets. Note, however, that you’ll need to use a font in the IDE that actually supports the fully Unicode codepage for the language in question. In the picture below, I’m using Courier New:
(By the way, the above text says "Welcome to the world of Unicode using Delphi 2009!!" in Japanese, Chinese, and Russian. Or at least I think so — maybe some of my co-workers played a joke on me.
)
And here’s the actual code being run in the application:


I have no idea about Japanese and Chinese, but your Russian phrase is 100% correct
July 17th, 2008 at 11:13 amNick, that’s great. But… Why Delphi _2009_? I think Delphi _2008_ would look better.
July 17th, 2008 at 11:39 amWhy Delphi 2008? It would look "old"… learn from MS and name your software with next year name, it will look the "future" (and it’s already July, even if the release it in a few months it would be almost 2009 already…)
July 17th, 2008 at 11:44 amAnother benefit of installing Asian language support is that it makes your spam e-mail look more interesting.
July 17th, 2008 at 12:36 pmUmm.. Nick, I’m sorry, but won’t you by any chances know/tell us: will the well-known bug with the code editor and international characters be fixed in Tiburon?
Just few random examples: QC reports #10428, #29791, #35035, #56611. This bug was introduced in D8 and haven’t fixed yet.
Thanks.
Sorry if this issue have been already discussed somewhere else.
P.S.
July 17th, 2008 at 1:50 pmI think this is one of most annoying bugs for non-english people. It makes writing programs with international characters in string constants and comments near to impossible. You must write very short line, you can not property works with vertical selection, etc…
It would be the shame to release 100% unicode application with such bug.
I � Unicode
July 17th, 2008 at 4:55 pmhttp://www.codinghorror.com/blog/archives/001084.html
Hi Nick, the Chinese translation is also 100% correct.
July 17th, 2008 at 5:20 pmJapanese looks right as well (I’m not really an expert on grammar, though, so there might be some subtle detail I’m missing).
Though Nick doesn’t mention it, this option isn’t found on Vista, since the fonts installed by it are always pre-installed. (Just saying it in case someone goes looking for it ahead of time.)
July 17th, 2008 at 11:50 pmLuigi Sandon -
I just hope that the release will take place earlier this year, not in November or December.
Russian -
I already mentioned this error here
July 18th, 2008 at 2:59 amhttp://blogs.codegear.com/nickhodges/2008/07/15/39066
I think, a cause of this error is a wrong interpretation of length of UTF8 strings somewhere in IDE: length(UTF8String) Size(UTF8String).
length(UTF8String) _not_equal_ Size(UTF8String)
July 18th, 2008 at 3:00 amIt’s a shame that not all Vista versions will allow to instal language packs…
July 18th, 2008 at 9:04 am[…] - String Theory Here Comes Tiburon Don’t Get Caught with Boxes Tiburon’s LoadFromFile and SaveToFile for Unicode […]
July 18th, 2008 at 12:09 pmI agree. If it ships between now and December 2008, it should be called Delphi 2009. And if it ships on or after Jan 1, 2009, it should be Delphi 2010.
Warren
July 18th, 2008 at 12:58 pmWarren -
I think they decided to skip Delphi 2008 because digit 8 has bad aura (Delphi

July 19th, 2008 at 12:39 amwhoops… Delphi 8
July 19th, 2008 at 12:41 am"you’ll need to use a font in the IDE that actually supports the fully Unicode codepage for the language in question"
I think that is exactly the problem that is solved by Supplemental language support. A part of the installation is the Uniscribe library which does font substitution. When the IDE uses TextOutW and the like, there is no need to select a specific font. Ranges of characters that are not supported by the selected font, will be rendered with an alternative font. Transparently, by the OS, because TextOutW etc are Uniscribe aware functions. To my knowledge Courier New does not contain CJK. But it does contain Cyrillic and therefore displayed the Russian text correct before the installation.
July 19th, 2008 at 1:52 amYes,Chinese is Correct
July 20th, 2008 at 4:58 pmnice
July 30th, 2008 at 5:53 pm[…] Don’t Get Caught with Boxes http://blogs.codegear.com/nickhodges/2008/07/17/39073 […]
August 12th, 2008 at 10:18 am