[fxruby-users] FXRuby and Unicode

Philippe Lang philippe.lang at attiksystem.ch
Sun Oct 15 03:48:47 EDT 2006


fxruby-users-bounces at rubyforge.org wrote:
> On Oct 9, 2006, at 1:31 AM, Philippe Lang wrote:
> 
>> I was just wondering what was the state of this discussion regarding
>> unicode. 
>> 
>> I'm unable to have french accents in a widget, like an FXLabel for
>> example. 
>> 
>> Using:
>> 
>> $KCODE = 'UTF8'
>> require 'jcode'
>> 
>> ... Does not help.
> 
> Philippe (and anyone else who's interested),
> 
> I wonder if you can try the attached example program on your
> computer and tell me what you see. As far as I can tell, the
> versions of FOX and FXRuby that I distribute for Windows was compiled
> correctly (i.e. with the UNICODE setting). When I run the attached
> example, the Unicode text inside the label is displayed properly.

Hi,

It works fine, thanks. But instead of this program, wouldn't it be possible to write a program where your include the accents directly in the source coude, just like with other languages?

------------------------

#!/usr/bin/env ruby

require 'fox16'
require 'jcode'

$KCODE = 'UTF8'

include Fox

# Prepare a string
label = "Les enfants vont à l'école.\nLa boulangère vend-elle le pain en août?"

FXApp.new("Unicode Example", "FoxTest") do |app|
  main = FXMainWindow.new(app, "Unicode Text", nil, nil, DECOR_ALL)
  FXLabel.new(main, label)
  app.create
  main.show(PLACEMENT_SCREEN)
  app.run
End


---------------
Philippe Lang
Attik System

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3125 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061015/ba63fe30/attachment.bin 


More information about the fxruby-users mailing list