View Issue Details

IDProjectCategoryView StatusLast Update
0022907LazarusPatchpublic2012-09-17 22:00
ReporterVladimir ZhirovAssigned ToMaxim Ganetsky 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.1 (SVN)Product Build 
Target VersionFixed in Version1.1 (SVN) 
Summary0022907: patch: DefaultTranslator has a problem if path to .po file contains non-ASCII characters
DescriptionIf path to .po file contains non-ASCII characters then DefaultTranslator fails to translate LCL forms. This is caused by double Utf8ToSys conversion: first in DefaultTranslator interfacing TPOFile, then in TPOFile itself.
TagsNo tags attached.
Fixed in Revision38720
LazTarget-
Widgetset
Attached Files
  • dtranslator.patch (513 bytes)
    Index: lcl/defaulttranslator.pas
    ===================================================================
    --- lcl/defaulttranslator.pas	(revision 38709)
    +++ lcl/defaulttranslator.pas	(working copy)
    @@ -385,7 +385,8 @@
     constructor TPOTranslator.Create(POFileName: string);
     begin
       inherited Create;
    -  FPOFile := TPOFile.Create(UTF8ToSys(POFileName));
    +  // TPOFile expects AFileName in UTF-8 encoding, no conversion required
    +  FPOFile := TPOFile.Create(POFileName);
     end;
     
     destructor TPOTranslator.Destroy;
    
    dtranslator.patch (513 bytes)

Activities

2012-09-17 14:46

 

dtranslator.patch (513 bytes)
Index: lcl/defaulttranslator.pas
===================================================================
--- lcl/defaulttranslator.pas	(revision 38709)
+++ lcl/defaulttranslator.pas	(working copy)
@@ -385,7 +385,8 @@
 constructor TPOTranslator.Create(POFileName: string);
 begin
   inherited Create;
-  FPOFile := TPOFile.Create(UTF8ToSys(POFileName));
+  // TPOFile expects AFileName in UTF-8 encoding, no conversion required
+  FPOFile := TPOFile.Create(POFileName);
 end;
 
 destructor TPOTranslator.Destroy;
dtranslator.patch (513 bytes)

Maxim Ganetsky

2012-09-17 21:54

developer   ~0062456

Applied, thanks.

Issue History

Date Modified Username Field Change
2012-09-17 14:46 Vladimir Zhirov New Issue
2012-09-17 14:46 Vladimir Zhirov File Added: dtranslator.patch
2012-09-17 18:33 Maxim Ganetsky Status new => assigned
2012-09-17 18:33 Maxim Ganetsky Assigned To => Maxim Ganetsky
2012-09-17 21:54 Maxim Ganetsky Fixed in Revision => r38720
2012-09-17 21:54 Maxim Ganetsky LazTarget => -
2012-09-17 21:54 Maxim Ganetsky Status assigned => resolved
2012-09-17 21:54 Maxim Ganetsky Fixed in Version => 1.1 (SVN)
2012-09-17 21:54 Maxim Ganetsky Resolution open => fixed
2012-09-17 21:54 Maxim Ganetsky Note Added: 0062456
2012-09-17 21:54 Maxim Ganetsky Fixed in Revision r38720 => 38720
2012-09-17 22:00 Vladimir Zhirov Status resolved => closed