Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: CBXE8 - Which UNICODE file format is the IDE editor supporting ?


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


Permlink Replies: 3 - Last Post: Apr 16, 2015 2:56 PM Last Post By: Remy Lebeau (Te...
GAI CHEW KAI

Posts: 117
Registered: 7/25/14
CBXE8 - Which UNICODE file format is the IDE editor supporting ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 15, 2015 7:28 PM
I am using Embarcadero® C++Builder XE8 Version 22.0.19027.8951 on Windows 8.1 x64 with latest service pack.

Recently migrate a .CPP saved under the following applications:

1. Microsoft Notepad ( UNICODE FORMAT )
2. Notepad++ ( UTF8, UCS-2 Big/Little Endian )

After loaded into CBXE8 IDE, there is compile error encountered.

Later, I use Microsoft Notepad to save that .CPP file under ANSI format and the compile process is carried out successfully.

QUESTIONS:

1. If I want to save as UNICODE format, where can I change the settings via CBXE8 IDE ( ...no settings under Tools->Options->Editor Options ) ?

2. Can CBXE8 supports .CPP source under UNICODE format which I believed previous version does ?

Please advise.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: CBXE8 - Which UNICODE file format is the IDE editor supporting ? [Edit]
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 15, 2015 8:59 PM   in response to: GAI CHEW KAI in response to: GAI CHEW KAI
GAI wrote:

1. Microsoft Notepad ( UNICODE FORMAT )

That is using UTF-16LE.

2. Notepad++ ( UTF8, UCS-2 Big/Little Endian )

UTF-8 and UCS-2 are very different encodings. Which one did you actually
use? And is Notepad++ really using UCS-2, or is it actually using UTF-16
and just labeling it as UCS-2? That makes a difference. And is there a
BOM in the front of the file?

After loaded into CBXE8 IDE, there is compile error encountered.

What is the actual error? Is it an IDE error when loading the file, or a
compiler error when compiling the file?

Later, I use Microsoft Notepad to save that .CPP file under
ANSI format and the compile process is carried out successfully.

Both would be using the user's default Ansi codepage, so no mismatch would
occur.

1. If I want to save as UNICODE format, where can I change the
settings via CBXE8 IDE ( ...no settings under Tools->Options->Editor
Options ) ?

Right-click on the code editor and go to the "File Format" menu item. The
format can be set on a per-file basis, which is why it is not a global IDE
setting.

2. Can CBXE8 supports .CPP source under UNICODE format which
I believed previous version does ?

Of course it can, just as previous versions did, for a long time. The IDE
save and load files in ANSI, UTF-8, UTF-16, and UTF-32 formats.

--
Remy Lebeau (TeamB)
GAI CHEW KAI

Posts: 117
Registered: 7/25/14
Re: CBXE8 - Which UNICODE file format is the IDE editor supporting ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 16, 2015 12:41 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
UTF-8 and UCS-2 are very different encodings. Which one did you actually
use? And is Notepad++ really using UCS-2, or is it actually using UTF-16
and just labeling it as UCS-2? That makes a difference. And is there a
BOM in the front of the file?
- ....just checked, CBXE8 IDE is set to UTF8 and the .CPP file is set to UNICODE LE.

What is the actual error? Is it an IDE error when loading the file, or a
compiler error when compiling the file?
- error message such as: "id" and "null" something....
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: CBXE8 - Which UNICODE file format is the IDE editor supporting ?[Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 16, 2015 2:56 PM   in response to: GAI CHEW KAI in response to: GAI CHEW KAI
GAI wrote:

- ....just checked, CBXE8 IDE is set to UTF8 and the .CPP file is set
to UNICODE LE.

That is not what I asked.

- error message such as: "id" and "null" something....

Not is not useful information, nor did it answer my questions about the error.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02