Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: unicode languages in c++ builder 10 seattle


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Mar 14, 2017 7:54 AM Last Post By: aidan levy Threads: [ Previous | Next ]
asew swecv

Posts: 3
Registered: 2/29/16
unicode languages in c++ builder 10 seattle  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 29, 2016 8:49 AM
Hi
How can I use unicode characters (like arabic) in the multi platform c++ programs and it shown correctly?
plz step by step.I am not advance.
Borja Serrano

Posts: 53
Registered: 1/10/13
Re: unicode languages in c++ builder 10 seattle  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 29, 2016 10:07 AM   in response to: asew swecv in response to: asew swecv
C++ Builder is actually UNICODE compliant so you don't have to do anything special
asew swecv

Posts: 3
Registered: 2/29/16
Re: unicode languages in c++ builder 10 seattle  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 29, 2016 11:59 AM   in response to: Borja Serrano in response to: Borja Serrano
Borja Serrano wrote:
C++ Builder is actually UNICODE compliant so you don't have to do anything special
But it doesnt show it correctly.i wrote an event when button1 clicked its text will turn to arabic text and it doest not show correctly.i tried windows and android outputs.
Remy Lebeau (Te...


Posts: 8,722
Registered: 12/23/01
Re: unicode languages in c++ builder 10 seattle  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 29, 2016 1:53 PM   in response to: asew swecv in response to: asew swecv
asew wrote:

But it doesnt show it correctly.i wrote an event when button1
clicked its text will turn to arabic text and it doest not show
correctly.i tried windows and android outputs.

Then you are clearly doing something wrong. Please show your actual code
and project setup when dealing with your Unicode strings.

--
Remy Lebeau (TeamB)
Andrew Law

Posts: 73
Registered: 11/6/02
Re: unicode languages in c++ builder 10 seattle  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 1, 2016 6:24 AM   in response to: asew swecv in response to: asew swecv
asew swecv wrote:
Borja Serrano wrote:
C++ Builder is actually UNICODE compliant so you don't have to do anything special
But it doesnt show it correctly.i wrote an event when button1 clicked its text will turn to arabic text and it doest not show correctly.i tried windows and android outputs.

C++Builder user interface elements use UnicodeString which uses UTF-16 internally. Your Unicode characters may be provided as UTF-8 or some other description of Unicode.

Please read this article which may help:

http://www.joelonsoftware.com/articles/Unicode.html

In order to properly convert between UTF-8 (for internal storage) and UTF-16 (for UI display), I have found this library to be quite useful for truly portable code:

http://utfcpp.sourceforge.net/

but you could also take a look at use of:

http://docwiki.embarcadero.com/Libraries/Seattle/en/System.UTF8String

and

http://docwiki.embarcadero.com/Libraries/Seattle/en/System.SysUtils.TEncoding

if you want to use the run time library functions to manipulate between different flavours of Unicode.

Regards
Andy
asew swecv

Posts: 3
Registered: 2/29/16
Re: unicode languages in c++ builder 10 seattle  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 4, 2016 1:56 AM   in response to: asew swecv in response to: asew swecv
Yes.i use utf-8.how can i correct texts in ui controls and how can i use utf-8 in my string vars.
aidan levy

Posts: 31
Registered: 7/6/16
Re: unicode languages in c++ builder 10 seattle  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 14, 2017 7:54 AM   in response to: asew swecv in response to: asew swecv
It because BiDiMode is not work properly. I assigned to Form : TabbedForm->BiDiMode= bdRightToLeft; Added to Lang components translations but text is still in Left ToRight mode !
How make it work ?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02