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.

Dark GDK / Languages in text

Author
Message
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 29th Dec 2009 13:46
Hello guys!

wondering if dbText() can show other language's text, API functions ( e.g. MessageBox() ) accepts alot of languages ( if not all ), but if i insert like : dbText ( 10, 10, "كتابة" ); it prints "?????"

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 29th Dec 2009 14:05
also, i keep getting those warnings:


NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 29th Dec 2009 15:01
If you're passing a char string, chars are a single byte and can only represent UTF-8 or ASCII characters. You need an extended charset... don't ask me how.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 29th Dec 2009 17:36 Edited at: 29th Dec 2009 17:37


the problem is that i cant pass wchar_t to dbText, is there a way to convert it ot a char*? ( i know nothing about wchar_t or unicode or w/e, i found this at some msdn site D: )

Serial Velocity
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 29th Dec 2009 18:44 Edited at: 29th Dec 2009 18:48
wchar_t is a wide character (for the extended charset), which is not supported by dbText. Converting it from a wchar_t array to a char array would just screw up your string as a char is made of a single byte while a wchar_t is made of more than a single byte.

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 29th Dec 2009 18:55
So..there's no solution? :/

Serial Velocity
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 29th Dec 2009 19:56
Well the only way I guess would be to somehow access the Direct3D Device directly and do it, or you could ask Cloggy to add wchar_t support to the text functions in his D3D Library.

marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 30th Dec 2009 10:08
Quote: "Well the only way I guess would be to somehow access the Direct3D Device directly and do it"

Yes..the text function in DirectX takes wide char..Go with that choice..^^ Hehe

When a person has nothing but a dream, can he dare to dream.
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 30th Dec 2009 12:09
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 30th Dec 2009 13:04
that code didnt work, and also this one:

same problem, ????? texts and the same warnings
thanks guys! i think ill use directx text functions

pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 30th Dec 2009 13:09 Edited at: 30th Dec 2009 14:18
not unicode.
text use Multi-Byte-Character-Set.
this is MS-DOS style CharacterSet.


DarkGDK use 8bit Code Text. (not unicode)
your's Latin/Arabic
http://en.wikipedia.org/wiki/ISO/IEC_8859-6


ok,
you read this
http://forum.thegamecreators.com/?m=forum_view&t=162088&b=22
and
setting "use Multi Byte Character Set"

Login to post a reply

Server time is: 2024-10-01 20:21:24
Your offset time is: 2024-10-01 20:21:24