I am having problems when I try to display Chinese characters in my VB6 application:
Not the correct characters are displayed.
There are ?'s being displayed.
System setup:
Windows 10
VB6
a) Why am I still using VB6 well it is because the DLL's that I have to interface to our serial devices were written in VB6 and using them in VB.NET is slow.
A translation file that contains all the strings that I display in my code and the corresponding Chinese characters the two things are separated by a pipe symbol "|"
Things that I have tried:
I changed to Region and Language to Taiwan Traditional.
I tried changing the font to anyone that supports the Big5 character set.
Please help and let me know if you need any more information.
Thank you
Related
My collegue wants to use my application in Japan. Therefore I tested the application in Windows 7 and changed the Regional Settings for "non-unicode"-Language to Japanese.
Now I have the problem, that some text are shown right with japanese characters. Other text is displayed with wrong characters (not japanese).
I tested also other languages like Chinese or Taiwanese and every text is right. I have only problems with Japanese.
Has anybody an idea what's wrong?
It is most likely because of the "Unihan" principle being applied by Unicode, which forced similarly-looking Japanese and Chinese letters to be encoded into same Unicode character despite their glyph being difference. Many computer systems would use Chinese font instead of Japanese font by default so the Chinese font would be displayed, hence it would result in wrong glyph. Changing the "non-unicode-language" into Japanese would not solve such a problem.
In order to display the proper Japanese glyph, you need to make sure that your application is going to use a Japanese font. Normally if your program is to run in an entirely Japanese environment which include changing the default language and font of the computer into Japanese then Japanese font would be used. On the other hand, you can also specify or embed a Japanese font for your application to make sure it would work as intended.
I'm not expert in Delphi and I'm trying to add "Extended ASCII String" broken into individual character and then add into the TSgringGrid.Cells[x,y]. Some of the characters are getting displayed but rest of the characters are not shown in these cells. Another way for me is to convert these characters in Hex-Mode and then show it but this is not Required.
ChartSet used was OEM_CHARSET and Font = Terminal. I simply wish to display all 255 characters in Cell. Basically I wanted to created the Binary Editor like Edit.com in Delphi/ Lazarus which is available in XP.
I used AnsiToUtf8(chr(i)) and it was solved.
I have an app that uses AngularJS along with angular-translate to provide localization. The app currently uses only English and German.
On the login page is a required field, an email. If there is an error, the app displays "A valid email is required" in English.
In German (and forgive me if this is mangled, this is Google Translate, I don't know any German) the phrase is "Eine gültige E-Mail erforderlich".
In the second word, you'll notice an international character, it looks like a "u" with two little dots over it. When the app is set to display in German, that character gets escaped and much weirdness happens on the screen.
Looking that the docs, it seems like using $translateProvider.useSanitizeValueStrategy() is supposed to handle this, but it's not. If I use $translateProvider.useSanitizeValueStrategy('escaped') then it look like this onscreen:
If use $translateProvider.useSanitizeValueStrategy('sanitize')(which I'd really prefer of course) then it looks like this:
I also happened to come across this article which states that my *.js translation file needs to be UTF-8 encoded. I opened up that file in NotePad++, changed the encoding to UTF-8 Without BOM and saved it, but I'm still seeing the error. And VS really hates the file now.
I know, it's a little late, but maybe others have similar Problems:
Adressing the UI:
Are you using the attribute style e.g.
<span translate="key"><span>
or inline style
<span>{{key | translate}}</span>
in your view?
I am working with the second style without issues.
Addressing your Problem with UTF-8:
I am not using Visual Studio nor Notepad++, so I don't know how Notepad++ handles the conversion. Possibly it does not convert the characters at all, but only changes the file to be seen as UTF-8.
Sublime Text 2 (1), on the other hand, offers you to 'Save with Encoding', which converts all characters accordingly. I stressed this conversion pretty much, so that I can recommend this approach with a clean conscience.
(1) I have no relations to Sublime Text, this is not meant be any form of commercial advertisement
Take the character "ب". It shows in stack overflow. I can see this in a cshtml file and in a js file
The character "ُ" on the other hand shows here correctly. However it shows as a question mark in the cshtml file and js file. If I copy it to notepad it shows as a Ḍammah (a loop normally above a letter which indicates a 'u' sound)
Why is it a question mark in the cshtml file if notepad understands it? ALso Visual Studio understands other arabic characters so why not this one
All I can think of is that a Dammah (as far as I know) always sits above another letter so can't be used in isolation?
What I'm trying to do is detect words that have a Dammah in them via Javascript
I'm completely new to unicode and non acii characters so this may be a stupid question, apologies if so
It often happens that an application uses a default font that does not support all the unicode characters that a usecase requires. In such a case, try to change the font to a more compatible one. "Courier New" works mostly well, also "Arial Unicode MS" does a good job. But there is no font that covers totally everything, so maybe you will need to switch between two or three fonts to cover all required characters. For Arabic, "Arial" is a good choice, but there are many interesting alternatives.
I am able to display chinese character correctly but when I try to display arabic string the output that display in OpenGL scene is different from the arabic string that display in Visual Studio Editor. I know it should be something to do with "Complex Script" but I am not able to find any good example regarding to this matter. I would like to know how to display arabic text correctly?
Unlike Latin characters which each have a single visual representation, each Arabic character can have many different appearances depending on the surrounding characters. The logical characters in an Arabic string need to be converted to a sequence of visual glyphs in order to be correctly displayed. OpenGL doesn't do this processing for you so you're seeing the logical characters rendered without this processing.
To get around this you will need to use a library such as Uniscribe to transform the logical string into a visual string which you then give to OpenGL for rendering. There are some samples here.