« Return to Thread: utf8 support

Re: utf8 support

by Mike Ginou :: Rate this Message:

Reply to Author | View in Thread

Alvaro,

Some preliminary investigation of utf8 support was made some time ago.
At the time it was concluded that simply adding

use open ':locale';

was sufficient to fix encoding mishaps (provided your locale is set
properly in your environment).

I have attached a very small patch that makes that fix, can you test it out?



Alvaro wrote:

> Hi,
> I am new user of tedia2sql, because I am spanish speaking have some
> problems with inserts created by tedia2sql because don't have utf8
> encode support, so I did a patch in perl code.
>
> I don't know anything about perl, but I tryed and it works!
>
> I explain it:
>
> first you have tell perl about encode type to open and save files and
> use of encode/decode functions:
>
> use open IO  => ':utf8';
> use Encode
>
> I think that value (utf8) must be passed trough command line,
> also there is a way to use 'locale' instead of 'utf8'
>
> then when teadia2sql do:
> print $iout &createInsertStatements ($compName, $compText);
>
> you have to do
>
> print $iout &createInsertStatements ($compName, decode('utf8,'$compText));
>
> again it must be a value passed by command-line
>
> Well I say again I don't know perl so checkit out please, if you like me
> submit
> a patch with command-line support and well code please tell me how I
> submit that.
>
> Greate work! very useful to me!
> thanks
>
> Alvaro
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>

Index: tedia2sql
===================================================================
RCS file: /cvs/tedia2sql/tedia2sql,v
retrieving revision 1.68
diff -u -r1.68 tedia2sql
--- tedia2sql 19 Dec 2004 03:44:42 -0000 1.68
+++ tedia2sql 24 Apr 2007 13:52:28 -0000
@@ -52,6 +52,8 @@
 #  actual license is at http://www.gnu.org/licenses/gpl.txt as well.
 # ------------------------ LICENSE SUMMARY ------------------------------------
 
+use open ':locale';
+
 sub parseRCFile($);
 sub checkExtraClauseUsage();
 sub checkMacroUsage();


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: utf8 support