Hi, There have been posts in the fox mailing-list recently, regarding a problem with european characters with accents, like "?", "?", "?", "?"... They all appear as squares on the screen. The answer of Jeroen is:> When you compile FOX, make sure -DUNICODE is passed; > without it, FOX will try to access the system with 8-bit > characters; this works for ASCII but not for larger code sets.Is it possible to compile next version of FXRuby with this option? I guess it is not for the moment, since I have exactly the same problem. Cheers! --------------- 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/20060928/5f2504e7/attachment.bin
On Sep 28, 2006, at 2:10 AM, Philippe Lang wrote:> Hi, > > There have been posts in the fox mailing-list recently, regarding a > problem with european characters with accents, like "?", "?", "?", > "?"... They all appear as squares on the screen. > > The answer of Jeroen is: > >> When you compile FOX, make sure -DUNICODE is passed; >> without it, FOX will try to access the system with 8-bit >> characters; this works for ASCII but not for larger code sets. > > Is it possible to compile next version of FXRuby with this option? > I guess it is not for the moment, since I have exactly the same > problem.]\Philippe, I will look into this. I was unaware of this problem.
On Thursday 28 September 2006 08:09, Lyle Johnson wrote:> > On Sep 28, 2006, at 2:10 AM, Philippe Lang wrote: > > > Hi, > > > > There have been posts in the fox mailing-list recently, regarding a > > problem with european characters with accents, like "?", "?", "?", > > "?"... They all appear as squares on the screen. > > > > The answer of Jeroen is: > > > >> When you compile FOX, make sure -DUNICODE is passed; > >> without it, FOX will try to access the system with 8-bit > >> characters; this works for ASCII but not for larger code sets. > > > > Is it possible to compile next version of FXRuby with this option? > > I guess it is not for the moment, since I have exactly the same > > problem.]\ > > Philippe, I will look into this. I was unaware of this problem.I''m not 100% sure if the FXRuby glue needs to be compiled with this; but certainly, FOX itself should be. The "outward face" FOX presents is UTF8, so as long as your app accesses the system via FOX, the FOX library will convert UTF8 to UTF16 behind the scenes. - Jeroen
On Sep 28, 2006, at 9:55 AM, Jeroen van der Zijp wrote:> I''m not 100% sure if the FXRuby glue needs to be compiled with this; > but certainly, FOX itself should be.Right. And unless the Visual C++ project file that comes with the FOX source distribution already has this flag set, I''m not compiling FOX that way (i.e. for the binary distribution of FXRuby for Windows). Anyways, I just need to check into this one and see what''s what. I''ve added it to my bug list until it''s resolved.> The "outward face" FOX presents is UTF8, so as long as your app > accesses > the system via FOX, the FOX library will convert UTF8 to UTF16 > behind the scenes.OK.
fxruby-users-bounces at rubyforge.org wrote:>>> Is it possible to compile next version of FXRuby with this option? >>> I guess it is not for the moment, since I have exactly the same >>> problem.]\ >> >> Philippe, I will look into this. I was unaware of this problem. > > I''m not 100% sure if the FXRuby glue needs to be compiled > with this; but certainly, FOX itself should be. > > The "outward face" FOX presents is UTF8, so as long as your > app accesses the system via FOX, the FOX library will convert > UTF8 to UTF16 behind the scenes.Hi, Here is a copy of the FXCalendar widget, on the month of - august in French - Ao?t 2006. This is also true for strings set from a program... --------------- Philippe Lang Attik System -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060928/0973ec02/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 18200 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060928/0973ec02/attachment-0001.jpe -------------- 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/20060928/0973ec02/attachment-0001.bin
On Thursday 28 September 2006 10:00, Lyle Johnson wrote:> > On Sep 28, 2006, at 9:55 AM, Jeroen van der Zijp wrote: > > > I''m not 100% sure if the FXRuby glue needs to be compiled with this; > > but certainly, FOX itself should be. > > Right. And unless the Visual C++ project file that comes with the FOX > source distribution already has this flag set, I''m not compiling FOX > that way (i.e. for the binary distribution of FXRuby for Windows). > Anyways, I just need to check into this one and see what''s what. I''ve > added it to my bug list until it''s resolved.BTW, I did release the FOX 1.6.15 the other day, with the suggested patches for FXTopWindow and FXMDIChild. - Jeroen
Dear all, to use bitmap icons, there are commands FXPNGIcon, FXBMPIcon etc. On the Wikipedia, there are some freely available SVG icons. Can these be used in connection with FXRuby ? A vector graphic is so memory-economic .... Thank you in advance, Best regards, Axel -------- Original-Nachricht -------- Datum: Fri, 29 Sep 2006 15:01:50 -0500 Von: Jeroen van der Zijp <jeroen at fox-toolkit.org> An: Lyle Johnson <lyle at knology.net> Betreff: Re: [fxruby-users] FXRuby and Unicode> On Thursday 28 September 2006 10:00, Lyle Johnson wrote: > > > > On Sep 28, 2006, at 9:55 AM, Jeroen van der Zijp wrote: > > > > > I''m not 100% sure if the FXRuby glue needs to be compiled with this; > > > but certainly, FOX itself should be. > > > > Right. And unless the Visual C++ project file that comes with the FOX > > source distribution already has this flag set, I''m not compiling FOX > > that way (i.e. for the binary distribution of FXRuby for Windows). > > Anyways, I just need to check into this one and see what''s what. I''ve > > added it to my bug list until it''s resolved. > > > BTW, I did release the FOX 1.6.15 the other day, with the suggested > patches for FXTopWindow and FXMDIChild. > > > - Jeroen > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users-- GMX DSL-Flatrate 0,- Euro* - ?berall, wo DSL verf?gbar ist! NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl
On Oct 5, 2006, at 4:18 PM, Axel Etzold wrote:> to use bitmap icons, there are commands > FXPNGIcon, FXBMPIcon etc. > On the Wikipedia, there are some freely available > SVG icons. Can these be used in connection with > FXRuby ? A vector graphic is so memory-economic ....Neither FOX nor FXRuby supports SVG icons. That would be a great thing for someone to develop (hint, hint)!
fxruby-users-bounces at rubyforge.org wrote:> On Sep 28, 2006, at 9:55 AM, Jeroen van der Zijp wrote: > >> I''m not 100% sure if the FXRuby glue needs to be compiled with this; >> but certainly, FOX itself should be. > > Right. And unless the Visual C++ project file that comes with > the FOX source distribution already has this flag set, I''m > not compiling FOX that way (i.e. for the binary distribution of > FXRuby for Windows). Anyways, I just need to check into this one and > see what''s what. I''ve added it to my bug list until it''s resolved.Hi, 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. On the opposite, I can read an accentuated characters string in an FXTextField, and store it into Postgresql, through Active Record. Is all that supposed to be corrected in the next version? --------------- 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/20061009/fe2b12be/attachment.bin
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. Thanks, Lyle -------------- next part -------------- A non-text attachment was scrubbed... Name: unicode.rb Type: text/x-ruby-script Size: 779 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061014/d64f2175/attachment-0001.bin -------------- next part --------------
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
Philippe Lang escribi?:> > 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?You can do just that. Make sure you use a modern editor that saves out Unicode UTF-8 text files (notepad, emacs, etc), not iso-8859-1 (Western encoding) text files. Alternatively, use the iconv.so module, like, passing the result of utf8 strings over to fxruby: #!/bin/env ruby require ''iconv'' class String # Take text from iso-8859-1 to utf-8 @@utf = Iconv.new( ''utf-8'', ''iso-8859-1'' ) # Take text from Unicode utf-8 to iso-8859-1 @@iso = Iconv.new( ''iso-8859-1'', ''utf-8'' ) def from_utf8 @@iso.iconv( self ) end def to_utf8 @@utf.iconv( self ) end end text = ''Voici est un exemple fran?ais avec iso-8859-1'' puts text puts ''Le m?me texte avec utf-8:'' puts text.to_utf8
On Oct 15, 2006, at 2:48 AM, Philippe Lang wrote:> 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?Jeroen will hopefully correct me if I''m wrong on this, but FOX can''t just guess how a string (with some accented characters) is encoded. For that reason, FOX only directly accepts UTF-8 encoded Unicode strings. In the program you attached to your message (where you included the accents directly in the source code), the string "looks" correct when I see it in my Mail program. But I don''t know how those accented characters were originally encoded. If they are UTF-8 encoded in the version you''re trying to run on your computer, then yes, that should work properly. For that to be true, the "?", which is Unicode U+00E0, would need to appear as the bytes (C3, A0). That''s how that character is encoded in UTF-8. If on the other hand, the characters are encoded in the ISO Latin 1 character set (a.k.a. ISO 8859-1) -- which is a distinct possibility, as a lot of editors use that by default -- your "?" character is probably encoded using the single byte E0. That single byte doesn''t make any sense in UTF-8 encoding, and that why you''d see a square (or some other error character) in a program that was trying to decode it as if it were UTF-8. So the question is, what to do if you have strings encoded in some format other than UTF-8? I think we might be able to use Ruby''s Iconv library for this. FOX also has a number of codecs that I have not yet exposed in FXRuby, but those might be good candidates too...
fxruby-users-bounces at rubyforge.org wrote:> Philippe Lang escribi?: >> >> 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? > > You can do just that. Make sure you use a modern editor that > saves out Unicode UTF-8 text files (notepad, emacs, etc), not > iso-8859-1 (Western encoding) text files. > > Alternatively, use the iconv.so module, like, passing the > result of utf8 strings over to fxruby: > ...Thanks, both solutions work just fine! I''m using Komodo as an editor, it is particularly simple to change the encoding of the source files. With UTF-8, all french accents are here... Cheers, --------------- 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/e82358ad/attachment.bin
On Oct 15, 2006, at 3:41 PM, Philippe Lang wrote:> Thanks, both solutions work just fine! I''m using Komodo as an > editor, it is particularly simple to change the encoding of the > source files. With UTF-8, all french accents are here...Great news! I''m glad this is working for you now.