Swedish Characters in Korean OS.

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
jdorlon
Posts: 15
Joined: Wed Jan 13, 2010 7:24 pm

Swedish Characters in Korean OS.

Post by jdorlon »

Hello,

I have a customer in Korea (using windows 7 in Korean) who has a problem with Swedish characters appearing correctly.

He can reproduce the problem with a small sample app.

To reproduce it, drop these components on a form:

Code: Select all

object es1: TEdit
  Left = 14
  Top = 16
  Width = 121
  Height = 21
  TabOrder = 0
  Text = 'kylsk'#229'p'
end
object es2: TEdit
  Left = 14
  Top = 43
  Width = 121
  Height = 21
  TabOrder = 3
  Text = 'Hall'#229
end
object ee2: TEdit
  Left = 141
  Top = 43
  Width = 121
  Height = 21
  TabOrder = 4
  Text = 'Hello'
end
object ee1: TEdit
  Left = 141
  Top = 16
  Width = 121
  Height = 21
  TabOrder = 2
  Text = 'Refrigerator'
end
object ek1: TEdit
  Left = 268
  Top = 16
  Width = 121
  Height = 21
  TabOrder = 1
  Text = #45257#51109#44256
end
object ek2: TEdit
  Left = 268
  Top = 43
  Width = 121
  Height = 21
  TabOrder = 5
  Text = #50504#45397
end
object XLS: TXLSReadWriteII5
  ComponentVersion = '5.20.69'
  Version = xvExcel2007
  DirectRead = False
  DirectWrite = False
  Left = 395
  Top = 29
end
Then put this in the FormCreate event handler and run it.

Code: Select all

  XLS.Version := xvExcel2007;
  XLS.Sheets[0].AsString[0,0] := 'Swedish';
  XLS.Sheets[0].AsString[1,0] := 'English';
  XLS.Sheets[0].AsString[2,0] := 'Korean';
  XLS.Sheets[0].AsString[0,1] := es1.text;
  XLS.Sheets[0].AsString[1,1] := ee1.text;
  XLS.Sheets[0].AsString[2,1] := ek1.text;
  XLS.Sheets[0].AsString[0,2] := es2.text;
  XLS.Sheets[0].AsString[1,2] := ee2.text;
  XLS.Sheets[0].AsString[2,2] := ek2.text;

  // Make the first row bold.
  XLS.CmdFormat.BeginEdit(XLS.Sheets[0]);
  XLS.CmdFormat.Font.Style := [xfsBold];
  XLS.CmdFormat.Apply(0, 0, 3, 0);
  // Autosize columns.
  XLS.sheets[0].AutoWidthCols(0, 2);

  XLS.SaveToFile('c:\SwedishEnglishKorean.xlsx');

  ShellExecute(Application.Handle, nil, 'c:\SwedishEnglishKorean.xlsx', '', '', SW_SHOW);
On my PC where I'm running Windows in English, everything comes out fine. On my customer's PC, there are question mark characters in place of some of the Swedish characters.

I am using Delphi XE2, compiling in 32 bit, XLSReadWriteII version 5.20.69, Windows 7.

Thanks

John
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Swedish Characters in Korean OS.

Post by larsa »

Hello

I can't reproduce this. The Swedish are correct written. I assumes that your Korean customer is using a windows with unicode support. The only reason I can think of is that the characters are missing in the font. Can you ask your Korean customer to create an excel file with Swedish characters? Please send me that file.
Lars Arvidsson, Axolot Data
jdorlon
Posts: 15
Joined: Wed Jan 13, 2010 7:24 pm

Re: Swedish Characters in Korean OS.

Post by jdorlon »

OK, I sent you the XLS file by email.

Thank you.

John
Post Reply