Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 22nd Aug 2011 06:59
I've been through code snipet today.
the commands :

set text font "fixed sys",128-->
print "japaneeze letters"

will print the japaeeze letters on the screen.

now, if number 128 will allow the japaneeze letters to be displayed, later I managed with the chineeze by trying out different numbers.
however I couldn't get the code for other chosen languages.

does anyone knows where I can get the language code because I couldn't fing any website that support this argument.

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 22nd Aug 2011 08:18 Edited at: 22nd Aug 2011 08:19
In the help files for SET TEXT FONT it says:

Quote: "To switch the character set to another language, use an international charset code. These codes can be located in the Principals section along with the ASCII Character Code Lists. "


I'd print them out for you but it's actually a graphic but there in there if you go to the help files and click Principals then ASCII Character Code Lists.

Booma
17
Years of Service
User Offline
Joined: 29th Mar 2009
Location:
Posted: 22nd Aug 2011 08:33
All ANSI char sets you can find in DBPro help -> PRINCIPLES -> ASCII character codes or in WinGDI.h
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 22nd Aug 2011 16:35
it not working I looked for it yesterday please follow the code:

[/code]set text size 25


set text font "fixedsys",178
print "دخحجث" `any arabic letters made by changing the computer language.

set text font "fixedsys",128
set text size 25
print "貴社ますます御隆昌にてお慶び申し上げます。平素は格別のご高配を賜り、厚く御礼申し上げます。" `toke it from words.

//this one by code snipet has worked.
set text font "fixedsys",128
print "ƒ_[ƒNƒx[ƒVƒbƒN" //japaneeze letterers by code snippet. //where they got it from?


wait key
end

[code]
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 22nd Aug 2011 19:09
Are you a Japanese?
Is your computer made in Japan?

There are a lot of Japanese character codes used in Japan.
http://en.wikipedia.org/wiki/Character_encoding
JIS X 0208 is a widely deployed standard for Japanese character encoding that has several encoding forms.
- Shift JIS (Microsoft Code page 932 is a dialect of Shift_JIS)
- EUC-JP
- ISO-2022-JP
- Unicode, UTF-8

DarkBasic uses only a "Shift-JIS" code.
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 22nd Aug 2011 21:55 Edited at: 22nd Aug 2011 21:57
Here's the chart from the help file...



basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 23rd Aug 2011 03:21
thanks guys for trying to help but I did go through all that before I post anything. have you tried the program? if you did, you will understand what I mean.

buy the way, am not japaneeze^^
Booma
17
Years of Service
User Offline
Joined: 29th Mar 2009
Location:
Posted: 23rd Aug 2011 12:48
Interesting situation... DBpro for text commands use DBProTextDebug.dll If we open this dll we will see that it compiled without defined UNICODE (For TEXT command it is used ExtTextOutA) so we can't use Unicode chars. It is possible to offer as the whole DBPro doesn't use unicode. I will be glad if I am mistaken.
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 23rd Aug 2011 14:51
at code snipet, it managed to do chineese & japaneese characters but nothing else. actually, I didn't know about the multi character support until I read the code snipet.
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 23rd Aug 2011 15:29 Edited at: 23rd Aug 2011 15:40
@Booma
DarkBasicPro does not use Unicode.
DarkBasicPro uses multi-byte character set.
It is character set of MS-DOS style.

multi-byte character set
http://en.wikipedia.org/wiki/Variable-width_encoding
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 23rd Aug 2011 16:34
@pcRaider: The site you're referring to does not solve the problem.
have you tried to script in oher language? please help in coding.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Aug 2011 21:32
Quote: "The site you're referring to does not solve the problem."

It doesn't?

After reading both links posted by pcRaider, I can see how it works, even though I don't know any Japanese.

Your code WON'T work, because the characters you typed are UNICODE (UTF8 most probably), which is not the same as Shift-JIS. The method is slightly similar to UFT8, but the mappings are completely different.

Here's how it goes:
The majority of the letters from 0x20 to 0x7f are pretty much mapped to ASCII (two exceptions by the looks of it) (1 byte = 1 character).
The byte values from 0xA1 to 0xDF are a straight mapping to Japanese characters (1 byte = 1 character).
The byte values 0x81 to 0x9F and 0xE0 to 0xEF are used to start an extended character and are combined with the value of the second byte to generate a single character (2 bytes = 1 character).

For example, the following code displays 'a little man in a box' - 因 (apologies to the Japanese!):


You can find mappings here, which came from one of those wikipedia pages.

136 is 0x88, and 246 is 0xF8 - look for the character in that table.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 24th Aug 2011 01:59
ap ap ap apology to pcRaider. thank Ian I got it, didn't know about the two bytes characters. Amazing.
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 25th Aug 2011 07:45 Edited at: 25th Aug 2011 07:46
@basjak
Is your WindowsOS English version?
Or is it a Japanese edition?
- - -
I attach a sample code.
Shift-JIS and unicode(utf-8) are included.
If the OS is a Japanese edition, Shift-JIS is displayed normally.
- - -
You use InternetExplorer if you want to convert it in Shift-JIS from unicode.
You convert an encode in IE in Shift-JIS.
You do Open and read it and do Save.
You change an encode in Shift-JIS at the time.
- - -
There is a method to change setting of WindwosOS,
There is a method of Japanese input (IME).
However, it is complicated.
- - -
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Aug 2011 07:29
in fact the project am looking for is to write Arabic letters but I picked up the Japanese because it was available in code snippets.

however, I couldn't find the middle letters.

in Arabic language, each middle letter in a word is connected to the letter before and the letter after in the same word.

that might be hard for you to know the word structure in arabic language but for now I only managed to get the format of a whole letter using your advice.

thank you anyway for your continues help.

Login to post a reply

Server time is: 2026-07-11 03:37:59
Your offset time is: 2026-07-11 03:37:59