UNICODE and ?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

UNICODE and ?

Post by Kwai chang caine »

Hello at all

Why, when i run this code, i have several "?" in the window debugger. :shock:

Code: Select all

For n = 32 To 1000 
  Debug Chr(n) 
Next
Yet, I have actived the UNICODE in compiler option.

How can i do, for see the chinese, russian, arabic characters ?

Thanks for your answer.
ImageThe happiness is a road...
Not a destination
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: UNICODE and ?

Post by Fangbeast »

Why, when i run this code, i have several "?" in the window debugger.

Code: Select all

For n = 32 To 1000 
  Debug Chr(n) 
Next
The currently loaded ASCII character set (and I'm sure someone will correct me) only contains 255 characters at any one time so you are trying to debug non-existent characters above 255.

Have a look at the available ASCII characters in the compiler from TOOLS/ASCII TABLE and you will see that it stops at 255.
How can i do, for see the chinese, russian, arabic characters ?
I believe that you have to have the relevant language support loaded in the Operating System (for all languages you wish to access) that you use and then load the appropriate font set containing those characters used to access them (but once again I could be wrong)
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

Thanks Fangbeast for your help

There is no other means to write characters aliens?
With a DLL, a database?
ImageThe happiness is a road...
Not a destination
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Re: UNICODE and ?

Post by lexvictory »

Kwaï chang caïne wrote: Why, when i run this code, i have several "?" in the window debugger.
debug window doesnt support unicode
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

debug window doesnt support unicode
Aaaahh ok, that's explain all :wink:

Thanks
ImageThe happiness is a road...
Not a destination
hardfalcon
User
User
Posts: 89
Joined: Fri Apr 29, 2005 3:03 pm
Location: Luxembourg
Contact:

Post by hardfalcon »

AFAIK the console debugger and the standalone debugger support unicode, only the one which is integrated into the IDE doesn't.
"And God caused a deep sleep to fall upon Adam, and he slept: and he took one of his ribs, and closed up the flesh instead thereof; And the spare rib, which God had taken from man, made he a woman, and brought her unto the man"
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

I'm very happy !!!
I have try with a file, and it's work fine, thanks again lexvictory
I see my chinese characters :D

Code: Select all

If FileSize("c:\EssaiUnicode.txt") <> - 1
 DeleteFile("c:\EssaiUnicode.txt")
EndIf 

OpenFile(1,"c:\EssaiUnicode.txt")

 For n = 32 To 65000
  WriteStringN(1, Str(n) + "=" + Chr(n))
 Next 

CloseFile(1)

MessageRequester("Extraction caracteres UNICODE", "Extraction des caracteres UNICODES terminée")

Code: Select all

64007=輻
64008=行
64009=降
64010=見
64011=廓
64012=兀
64013=嗀
64014=﨎
64015=﨏
64016=塚
64017=﨑
64018=晴
64019=﨓
64020=﨔
64021=凞
64022=猪
64023=益
64024=礼
64025=神
64026=祥
64027=福
64028=靖
64029=精
64030=羽
64031=﨟
64032=蘒
64033=﨡
64034=諸
64035=﨣
64036=﨤
64037=逸
64038=都
64039=﨧
64040=﨨
I have again tree question to you :

1/ The UNICODE is installed on all the PC like the ASCII, without install CD language windows ?

2/ They are again several square characters, is it normal ?, is it empty characters ?

Rectangle :

Code: Select all

41312=ꅠ
41313=ꅡ
41314=ꅢ
41315=ꅣ
41316=ꅤ
41317=ꅥ
41318=ꅦ
41319=ꅧ
41320=ꅨ
41321=ꅩ
41322=ꅪ
41323=ꅫ
41324=ꅬ
41325=ꅭ
41326=ꅮ
41327=ꅯ
41328=ꅰ
41329=ꅱ
41330=ꅲ
41331=ꅳ
41332=ꅴ
and square

Code: Select all

57704=
57705=
57706=
57707=
57708=
57709=
57710=
57711=
57712=
57713=
57714=
57715=
57716=
57717=
57718=
57719=
57720=
57721=
57722=
57723=
57724=
57725=
57726=
57727=
57728=
3/ Where is the link for download the complet table of this UNICODE, i have visited the http://unicode.org , but they are several links :cry:

Thanks for your help 8)
ImageThe happiness is a road...
Not a destination
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

i believe there are some reserved (unused) characters, so that may be why windows shows boxes, only 5 of the chinese characters showed here on my linux system...

on windows, from memory asian languages have to be installed specifically, but most european languages are installed by default (cyrillic, etc) - this is all on an english/australian version of windows XP
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

but most european languages are installed by default (cyrillic, etc)
You don't know where i can found the table of character installed by default ?
ImageThe happiness is a road...
Not a destination
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

no idea sorry
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

I have several fonts installed on the computer that are just chinese. I would assume the same would be true for russian or cyrillic fonts as well. Perhaps you could get a hold of a russian version of ARIAL from one of our russian associates? 8)

Play with the font. Fonts are where it is at! :D
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

just an example of my Printer_Lib :

Code: Select all

Print_OpenPrinter()

If Print_EnumFonts(#DEFAULT_CHARSET,"Arial")
  count=Print_CountFonts()
  If count>0
    For i=0 To count-1
      Debug Str(Print_EnumFontID(i))+":"+Print_EnumFontName(i)+" / "+Print_EnumFontStyle(i)+" / "+Print_EnumFontScript(i)
    Next
  EndIf
  Debug "Found "+Str(count)+" fonts with #DEFAULT_CHARSET"
EndIf

Code: Select all

1:Arial / Standard / Westlich
2:Arial / Standard / Hebräisch
3:Arial / Standard / Arabisch
4:Arial / Standard / Griechisch
5:Arial / Standard / Türkisch
6:Arial / Standard / Baltisch
7:Arial / Standard / Mitteleuropäisch
8:Arial / Standard / Kyrillisch
9:Arial / Standard / Vietnamesisch
10:Arial Fett / Fett / Westlich
11:Arial Fett / Fett / Hebräisch
12:Arial Fett / Fett / Arabisch
13:Arial Fett / Fett / Griechisch
14:Arial Fett / Fett / Türkisch
15:Arial Fett / Fett / Baltisch
16:Arial Fett / Fett / Mitteleuropäisch
17:Arial Fett / Fett / Kyrillisch
18:Arial Fett / Fett / Vietnamesisch
19:Arial Fett Kursiv / Fett Kursiv / Westlich
20:Arial Fett Kursiv / Fett Kursiv / Hebräisch
21:Arial Fett Kursiv / Fett Kursiv / Griechisch
22:Arial Fett Kursiv / Fett Kursiv / Türkisch
23:Arial Fett Kursiv / Fett Kursiv / Baltisch
24:Arial Fett Kursiv / Fett Kursiv / Mitteleuropäisch
25:Arial Fett Kursiv / Fett Kursiv / Kyrillisch
26:Arial Fett Kursiv / Fett Kursiv / Vietnamesisch
27:Arial Kursiv / Kursiv / Westlich
28:Arial Kursiv / Kursiv / Hebräisch
29:Arial Kursiv / Kursiv / Griechisch
30:Arial Kursiv / Kursiv / Türkisch
31:Arial Kursiv / Kursiv / Baltisch
32:Arial Kursiv / Kursiv / Mitteleuropäisch
33:Arial Kursiv / Kursiv / Kyrillisch
34:Arial Kursiv / Kursiv / Vietnamesisch
35:Arial / Standard / Westlich
36:Arial / Standard / Hebräisch
37:Arial / Standard / Arabisch
38:Arial / Standard / Griechisch
39:Arial / Standard / Türkisch
40:Arial / Standard / Baltisch
41:Arial / Standard / Mitteleuropäisch
42:Arial / Standard / Kyrillisch
43:Arial / Standard / Vietnamesisch
44:Arial / Standard / Westlich
45:Arial / Standard / Hebräisch
46:Arial / Standard / Arabisch
47:Arial / Standard / Griechisch
48:Arial / Standard / Türkisch
49:Arial / Standard / Baltisch
50:Arial / Standard / Mitteleuropäisch
51:Arial / Standard / Kyrillisch
52:Arial / Standard / Vietnamesisch
Found 52 fonts with #DEFAULT_CHARSET
Post Reply