Freewrap and encodings 
Author Message
 Freewrap and encodings

Has anyone figured out how to use different encodings using FreeWrapped
programs?

On my machine it seems that wrapped program is able to locate encoding files
from my tcl installation directory, but on machine without tcl the program
fails when trying fconfigure $f encoding xxx: "Unknown encoding xxx".

So it seems that wrapped program does not include encodings normally shipped
in lib/tcl8.x/encoding -directory. This is ok, but I still would need to add
at least necessary encoding files to the distribution, if I only knew where
to put them so that the wrapped program could locate them.

-- Roy Nurmi



Sat, 08 Mar 2003 03:00:00 GMT  
 Freewrap and encodings

Quote:
> Has anyone figured out how to use different encodings using FreeWrapped
> programs?

> On my machine it seems that wrapped program is able to locate encoding
files
> from my tcl installation directory, but on machine without tcl the program
> fails when trying fconfigure $f encoding xxx: "Unknown encoding xxx".

> So it seems that wrapped program does not include encodings normally
shipped
> in lib/tcl8.x/encoding -directory. This is ok, but I still would need to
add
> at least necessary encoding files to the distribution, if I only knew
where
> to put them so that the wrapped program could locate them.

Take a look at the freeWrap "How-to" documentation that comes with the
distribution or go to
http://home.nycap.rr.com/dlabelle/freewrap/freewrap_howto.html#9

I have tested this feature and it does work under freeWrap 4.3.

Dennis LaBelle



Sat, 08 Mar 2003 03:00:00 GMT  
 Freewrap and encodings
Hi,

I have a similar problem to use "encoding" with "freewrap43".

I created an executable program as following:

 % freewrap main.tcl sub.tcl /usr/local/lib/tcl8.3/msgcat1.0/msgcat.tcl /usr/local/lib/tcl8.3/encoding/euc-jp.enc

---- main.tcl ----
encoding system euc-jp
set file1 sub.tcl
set fd [open $file1 r]
fconfigure $fd -encoding euc-jp
set jscript [read $fd]
close $fd
eval $jscript
------------------

---- sub.tcl ----
package require msgcat
::msgcat::mclocale euc-jp
::msgcat::mcload msgs
set lbl [::msgcat::mc "Hello"]
button .b1 -text hello -textvariable lbl
button .b2 -text "EUC-JP_ENCODED_JAPANESE"
pack .b1 .b2
------------------

---- msgs/euc-jp.msg  ----
::msgcat::mcset euc-jp "Hello" "EUC-JP_ENCODED_JAPANESE"
------------------

It works fine if my tcl-scripts contain no non-ascii charactors, and
an euc-jp encoded message file (msgs/enc-jp.jp) is read from a disk.
However, it does not work if msgs/enc-jp.msg is wrapped into an
executable.

Any suggestions?




   > Has anyone figured out how to use different encodings using FreeWrapped
   > programs?

   Take a look at the freeWrap "How-to" documentation that comes with the
   distribution or go to
   http://home.nycap.rr.com/dlabelle/freewrap/freewrap_howto.html#9

   I have tested this feature and it does work under freeWrap 4.3.

   Dennis LaBelle

-- Kaz



Mon, 17 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Character Encodings (APL2 and APL2741)

2. copypaste/encodings issues

3. Character encodings.

4. RDoc and non-ascii encodings

5. available encodings for iconv arguments

6. using string with different encodings

7. newbie with html encodings

8. x86 Direction bit in GP instruction encodings

9. Comment on PEP 263 - Defining Python Source Code Encodings

10. PEP: Defining Python Source Code Encodings

11. PEP: Defining Unicode Literal Encodings (revision 1.1)

12. PEP: Defining Unicode Literal Encodings (revision 1.1)

 

 
Powered by phpBB® Forum Software