Unicode judgment failed

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
suteneko
Posts: 3
Joined: Tue May 20, 2008 7:33 am

Unicode judgment failed

Post by suteneko »

Hi, I'm user of XLRReadWriteII4 of Japan.
I can't create Unicode cell that include only character under FF.

For example
xlrReadWrite.Sheet[0].AsString[0, 0] := #$00DC#$0042; // ÜB
This result in EXCEL is failed. The accent mark of U disappear.

One more example,
xlrReadWrite.Sheet[0].AsString[0, 0] := #$FF11#$00DC; // 1(kanji)Ü
This result in EXCEL is quite good. The accent mark of U is kept.

I think, "function TSST2.IsUnicode(S: WideString): boolean" is problem.
In this function, string whose first character is under FF is treated as non-unicode string. I don't know why IsUnicode is needed, but I strongly hope this issue will be solved.
suteneko
Posts: 3
Joined: Tue May 20, 2008 7:33 am

Post by suteneko »

I wrote wrong result for first example.

> For example
> xlrReadWrite.Sheet[0].AsString[0, 0] := #$00DC#$0042; // ÜB
> This result in EXCEL is failed. The accent mark of U disappear.

Correctly result is...
This result in EXCEL is failed. The Japanese one-byte character "ワ"appear instead of U with accent mark.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post by larsa »

Hello

When I test this, I get the correct characters. The problem is probably the font you are using.


Lars Arvidsson, Axolot Data
suteneko
Posts: 3
Joined: Tue May 20, 2008 7:33 am

Post by suteneko »

Hello.

The font I used is Arial. This font is unicode font.
When I write "ÜB" to EXCEL manualy with Arial font, there is no problem.

How can I solve the problem.
vga
Posts: 14
Joined: Tue Jul 29, 2008 9:19 pm

the same error i reproduced!

Post by vga »

xlrReadWrite.Sheet[0].AsString[0, 0] := tntedit.text; // ÜB

This result in EXCEL is failed. The one-byte character "?"appear instead of U with accent mark


AsString[1,1] := WideChar($03C0);

work well.


"When I test this, I get the correct characters. The problem is probably the font you are using. "

which font shuld I use?
vga
Posts: 14
Joined: Tue Jul 29, 2008 9:19 pm

delphi 7.0 & delphi 2007

Post by vga »

delphi 7.0 & delphi 2007 do not work well before rewrite isunicode function
Post Reply