Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius
New Topic Reply Printer Friendly
Japanese Characters for DFM - Bugs and Quirks in Sisulizer - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Thu Mar 22nd, 2012 02:36 pm
PM Private Upload Quote Reply
HerrVoelker
Member


Joined: Tue Jul 19th, 2011
Location: Kansas City, Missouri USA
Posts: 7
Status: 
Offline
I am using C++Builder XE with '_TCHAR maps to' set to 'wchar_t'.

I have strings in both DFM files and in string resources (via PAS files).

When I Sisulize my app with Japanese, the string resource strings come up fine when the app is run.

However all of the strings in the DFMs come up as question marks. :?


If I enter Japanese characters directly into the DFM in the C++Builder IDE, they come up fine when the app is run...


Even though it should not make a difference for a Unicode app, I did trying changing the 'Language for non-Unicode programs' Windows setting...  Nothing changed.

I am running on Windows 7 Ultimate (64-bit) and using the latest Sisulizer v3.

Any thoughts or suggestions?  Is there a C++Builder XE or Sisulizer setting I am missing?

Last edited on Thu Mar 22nd, 2012 02:51 pm by HerrVoelker

Back To Top PM Private Upload Quote Reply

 Posted: Thu Mar 22nd, 2012 03:32 pm
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 2988
Status: 
Offline
Hello,

I'm not C++ Builder developer, but seems to me that issue could be related to other issue described in this thread: http://www.sisulizer.net/forum3/2688.html
Please, check your Unicode settings in "VCL options" tab of source properties dialog and optionally set Widestring usage option to "Yes".

Janusz



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Thu Mar 22nd, 2012 09:19 pm
PM Private Upload Quote Reply
HerrVoelker
Member


Joined: Tue Jul 19th, 2011
Location: Kansas City, Missouri USA
Posts: 7
Status: 
Offline
Setting 'Widestring (Unicode) usage' from 'Automatic' to 'Yes' did correct the issue.

Does the automatic setting not work properly?  Per the help documentation, it seems that Unicode strings should have been used...

Thank you for the help

Back To Top PM Private Upload Quote Reply

 Posted: Thu Mar 22nd, 2012 09:19 pm
PM Private Upload Quote Reply
HerrVoelker
Member


Joined: Tue Jul 19th, 2011
Location: Kansas City, Missouri USA
Posts: 7
Status: 
Offline
Setting 'Widestring (Unicode) usage' from 'Automatic' to 'Yes' did correct the issue.

Does the automatic setting not work properly?  Per the help documentation, it seems that Unicode strings should have been used...

Thank you for the help

Back To Top PM Private Upload Quote Reply

 Posted: Thu Mar 22nd, 2012 10:37 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1316
Status: 
Offline
It seems that Sisulizer could not detect your EXE correctly. Can you zip the EXE into a zip file and send to us. Click Private Upload to send the zip file.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Thu Mar 22nd, 2012 10:57 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1316
Status: 
Offline
HerrVoelker wrote: I have strings in both DFM files and in string resources (via PAS files).

Do you means that you have Delphi units that contain resourcestrings. Then you add that unit(s) into you CBuilder project. Those strings get correctly into resource strings blocks of compiled EXE. However how to you access the strings from your C++ code? How do you know the resource string ID you should use when calling LoadString?

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Fri Mar 23rd, 2012 01:13 pm
PM Private Upload Quote Reply
HerrVoelker
Member


Joined: Tue Jul 19th, 2011
Location: Kansas City, Missouri USA
Posts: 7
Status: 
Offline
Yes, the strings are in Delphi  resourcestring blocks.  C++Builder automatically creates #defines in an .hpp in order to access the strings (below is a short example).  These strings are coming through OK...

Strings that are in Delphi forms (DFMs) are the ones getting mangled when the widestring option is set to automatic.

// CodeGear C++Builder
// Copyright (c) 1995, 2010 by Embarcadero Technologies, Inc.
// All rights reserved


// (DO NOT EDIT: machine generated header) 'GenRes.pas' rev: 22.00

#ifndef GenresHPP
#define GenresHPP


#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp> // Pascal unit
#include <SysInit.hpp> // Pascal unit


//-- user supplied -----------------------------------------------------------

namespace Genres
{
//-- type declarations -------------------------------------------------------
//-- var, const, procedure ---------------------------------------------------
extern PACKAGE System::ResourceString _Denom_XRollOfX;
#define Genres_Denom_XRollOfX System::LoadResourceString(&Genres::_Denom_XRollOfX)
extern PACKAGE System::ResourceString _Denom_XRollsOfX;
#define Genres_Denom_XRollsOfX System::LoadResourceString(&Genres::_Denom_XRollsOfX)
extern PACKAGE System::ResourceString _Denom_RemoveXRollOfX;
#define Genres_Denom_RemoveXRollOfX System::LoadResourceString(&Genres::_Denom_RemoveXRollOfX)
extern PACKAGE System::ResourceString _Denom_RemoveXRollsOfX;
#define Genres_Denom_RemoveXRollsOfX System::LoadResourceString(&Genres::_Denom_RemoveXRollsOfX)
extern PACKAGE System::ResourceString _Denom_XX;
#define Genres_Denom_XX System::LoadResourceString(&Genres::_Denom_XX)


 

Back To Top PM Private Upload Quote Reply

 Posted: Fri Mar 23rd, 2012 09:50 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1316
Status: 
Offline
Thank you for the sample. When Sisulizer reads a Delphi or C++Builder application it tries to detect the version of VCL it uses. More precisely it tried to find our if VCL that EXE uses is a Unicode VCL (e.g. Delphi/CBuilder 2009 or later).

This detection works on 2009, 2010 and XE2 and on Delphi XE but can not be done on CBuilder XE. This is because the EXE created by CB XE misses some resources that that Delphi XE adds. This causes that Sisulizer can not 100% acurately detect EXE and Unicode enabled and this is why the Unicode mode stays automatic.

So my advice for you is that you always manually set the Unicode usage to Yes. If you change to XE2 Sisulizer can automatically detect the Unicode usage.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Fri Mar 23rd, 2012 09:57 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1316
Status: 
Offline
HerrVoelker wrote: Yes, the strings are in Delphi  resourcestring blocks.  C++Builder automatically creates #defines in an .hpp in order to access the strings (below is a short example).  These strings are coming through OK...

Thank you. I learned something new :-) This feature greatly simplifies resource string usage in C++Builder.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

Current time is 07:42 pm  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > Japanese Characters for DFM



WowUltra modified by Sisulizer Copyright © 2007-09 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize