Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-17 Thread Jonathan Dearborn
Thanks for all of your help, Torsten.  I got it figured out.  Emacs wasn't very 
pleasant, but it led me to see what I needed to do.  I checked the binary 
representations of the characters at www.fileformat.info and used the two 
characters they represent to make each one I needed.  For anyone who would like 
to see what it ended up looking like, check out 
http://pubpages.unh.edu/~jmb97/SDL/NFont/render-nfont.scm
Maybe it would have been easier to write a C++ program that outputs a string to 
a file, since the unicode escape (\u00A1, for example) is really simple.  
Anyhow, it's done.

Thanks again,
Jonny D





> From: [EMAIL PROTECTED]
> To: gimp-user@lists.xcf.berkeley.edu
> Subject: Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals
> Date: Fri, 16 May 2008 18:31:20 +0200
> CC: [EMAIL PROTECTED]
> 
> Hi,
> 
> > I tried using Emacs, but changing the encoding didn't affect anything.
> 
> Just loading the file, changing the encoding and saving it again won't do 
> anything.  The encoding switches are meant for newly entered text.
> 
> That means that you will have to re-enter the characters with the UTF-8 
> encoding switched on.
> 
> 
>   Torsten

_
Give to a good cause with every e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?souce=EML_WL_ GoodCause___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-16 Thread Torsten Neuer
Hi,

> I tried using Emacs, but changing the encoding didn't affect anything.

Just loading the file, changing the encoding and saving it again won't do 
anything.  The encoding switches are meant for newly entered text.

That means that you will have to re-enter the characters with the UTF-8 
encoding switched on.


  Torsten


signature.asc
Description: This is a digitally signed message part.
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-16 Thread Jonathan Dearborn
I'm still not able to get this to work.  Attached is my script (or find it at 
http://pubpages.unh.edu/~jmb97/SDL/NFont/render-nfont.scm).  It produces a 
bitmap of the characters in a font.  I thought the whole first byte was 
identical between ASCII and UTF-8...  Anyhow, maybe someone can get it to work 
or see what I'm trying to do.  Basically, I'm just trying to put the special 
and accented characters (161, '¡' to 255, ÿ) into a string, but the Gimp isn't 
outputting anything where they should be.  The script appears as NFont->Create 
NFont.  Then you must check the extended ASCII box.  I tried using Emacs, but 
changing the encoding didn't affect anything.

Thanks,
Jonny D



> From: [EMAIL PROTECTED]
> To: gimp-user@lists.xcf.berkeley.edu
> Subject: Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals
> Date: Thu, 15 May 2008 10:46:41 +0200
> CC: [EMAIL PROTECTED]
> 
> Hi,
> 
> > Do you mean just type them in? 
> 
> Yes.
> 
> > That isn't working for me.  Wouldn't switching the encoding affect the whole
> > file instead of just a particular string?
> 
> That should do no harm as Gimp is doing about everything in UTF-8 internally.
> Plus, any characters that are relevant to Scheme syntax (i.e. not "strings") 
> are from 7-bit ASCII and won't be touched anyway when you switch to UTF-8.
> 
> > I'm on WinXP, just using Notepad, which can handle the ascii 
> > values I'm using (I was surprised that Dr. Scheme can't, however).
> 
> Strictly speaking, the values that you are talking about are not ASCII (as 
> that only defines 7 bits originally - the upper 127 characters depend on 
> which locale you are in and might even be text graphics).
> 
> Notepad also stores its data in an encoding, which however is not UTF-8.
> 
> > Typing them into a string isn't working.
> 
> Hmm... have you tried using the ALT- for entering the 
> values ?  You seem to know the encoding values of the characters in UTF-8, so 
> this might work then with Notepad.
> 
> 
>Torsten

_
Change the world with e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld

render-nfont.scm
Description: Binary data
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-15 Thread Torsten Neuer
Hi,

> Do you mean just type them in? 

Yes.

> That isn't working for me.  Wouldn't switching the encoding affect the whole
> file instead of just a particular string?

That should do no harm as Gimp is doing about everything in UTF-8 internally.
Plus, any characters that are relevant to Scheme syntax (i.e. not "strings") 
are from 7-bit ASCII and won't be touched anyway when you switch to UTF-8.

> I'm on WinXP, just using Notepad, which can handle the ascii 
> values I'm using (I was surprised that Dr. Scheme can't, however).

Strictly speaking, the values that you are talking about are not ASCII (as 
that only defines 7 bits originally - the upper 127 characters depend on 
which locale you are in and might even be text graphics).

Notepad also stores its data in an encoding, which however is not UTF-8.

> Typing them into a string isn't working.

Hmm... have you tried using the ALT- for entering the 
values ?  You seem to know the encoding values of the characters in UTF-8, so 
this might work then with Notepad.


   Torsten


signature.asc
Description: This is a digitally signed message part.
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-15 Thread Sven Neumann
Hi,

just use a proper editor. Emacs is available for free and it supports
UTF-8 and syntax highlighting for the Scheme language.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-14 Thread Jonathan Dearborn
Do you mean just type them in?  That isn't working for me.  Wouldn't switching 
the encoding affect the whole file instead of just a particular string?  I'm on 
WinXP, just using Notepad, which can handle the ascii values I'm using (I was 
surprised that Dr. Scheme can't, however).  Typing them into a string isn't 
working.  I've tried escaping them and using the hex value with \x, but that 
didn't seem to fly with Script-fu.  'format' isn't available either.  The Gimp 
2.4 supposedly supports these characters, but I just haven't seen the 
documentation to back it up.  Is there another way that you know of?

Thanks for your help,
Jonny D



> From: [EMAIL PROTECTED]
> To: gimp-user@lists.xcf.berkeley.edu
> Date: Wed, 14 May 2008 16:28:25 +0200
> Subject: Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals
> 
> Hello,
> 
> > I've been having trouble finding how to encode UTF-8 special characters
> > into a string literal in Script-fu.  Could someone provide an example of
> > how to hard-code international characters into a string?
> 
> The simplest and easiest way is to use a text editor that is capable of 
> switching text encoding.  One of those editors would be Emacs, which is also 
> available on many platforms (from the menu select: Options -> Mule -> Set 
> Language Environment -> UTF-8).
> 
> 
>   Torsten

_
With Windows Live for mobile, your contacts travel with you.
http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_Refresh_mobile_052008___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-14 Thread Torsten Neuer
Hello,

> I've been having trouble finding how to encode UTF-8 special characters
> into a string literal in Script-fu.  Could someone provide an example of
> how to hard-code international characters into a string?

The simplest and easiest way is to use a text editor that is capable of 
switching text encoding.  One of those editors would be Emacs, which is also 
available on many platforms (from the menu select: Options -> Mule -> Set 
Language Environment -> UTF-8).


  Torsten


signature.asc
Description: This is a digitally signed message part.
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Script-fu (Scheme) and UTF-8 literals

2008-05-14 Thread Jonathan Dearborn
Hey,

I've been having trouble finding how to encode UTF-8 special characters into a 
string literal in Script-fu.  Could someone provide an example of how to 
hard-code international characters into a string?  Specifically, I'm trying to 
put ascii codes 161 - 255 into a string with each character separated by a 
space.

Thanks,
Jonny D

_
Get Free (PRODUCT) RED™  Emoticons, Winks and Display Pics.
http://joinred.spaces.live.com?ocid=TXT_HMTG_prodredemoticons_052008___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user