Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-03-06 Thread tedd
At 8:35 AM +0100 3/6/08, David Sveningsson wrote: Sidenote: If I replace åäö with numerical html entities it works, but that's not a reasonable solution to me. And you're right -- it isn't a reasonable solution . Whatever is generating your characters should generating the same characters

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-03-05 Thread David Sveningsson
tedd skrev: At 2:17 AM + 2/29/08, Nathan Rixham wrote: Nathan Rixham wrote: try changing: imagettftext( $im, $title_size, 0, 50, 50, $white, $font, $title ); to: imagettftext($im, $title_size, 0, 50, 50, $white, $font, utf8_decode($title)); Both statements work for me. -- see here: htt

[PHP] Re: imagettftext and utf-8 (swedish characters)

2008-03-05 Thread tedd
At 2:17 AM + 2/29/08, Nathan Rixham wrote: Nathan Rixham wrote: try changing: imagettftext( $im, $title_size, 0, 50, 50, $white, $font, $title ); to: imagettftext($im, $title_size, 0, 50, 50, $white, $font, utf8_decode($title)); Both statements work for me. -- see here: http://www.webby

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread David Sveningsson
Jochem Maas skrev: I guess I skimmed somewhat too ... but I based my assumption on the following from the OPs post: /index.php/slides/upload: $title = htmlentities($_POST['title'], ENT_COMPAT, 'UTF-8'); $image = '/index.php/slides/preview?title='.urlencode($title).'&content='.urlencode($_POST

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread David Sveningsson
Frank Arensmeier skrev: 29 feb 2008 kl. 03.41 skrev David Sveningsson: Nathan Rixham skrev: before going any further, your HTML page is in UTF-8 yes? with the appropriate content-type line. Yes, apache uses only utf-8 as charset and the html content-type meta tag is set to utf-8 too. Also,

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread Daniel Brown
On Fri, Feb 29, 2008 at 1:31 PM, Jochem Maas <[EMAIL PROTECTED]> wrote: > (my guess would be you could rely on all systems that have said TTF file > to support the same chars - I assume that although it may be compiled > diffferently > for different platforms the source font definition is going

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread Jochem Maas
Daniel Brown schreef: On Fri, Feb 29, 2008 at 12:59 PM, Jochem Maas <[EMAIL PROTECTED]> wrote: it does because he's passing the title as an argument to the image script: I would say that's what I get for skimming, but look here: I guess I skimmed somewhat too ... but I based my assumpti

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread Daniel Brown
On Fri, Feb 29, 2008 at 12:59 PM, Jochem Maas <[EMAIL PROTECTED]> wrote: > it does because he's passing the title as an argument to the image script: I would say that's what I get for skimming, but look here: > The form accepts (expects) UTF-8 (though the OP may be better with `latin1

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread Jochem Maas
Daniel Brown schreef: On Thu, Feb 28, 2008 at 9:17 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote: before going any further, your HTML page is in UTF-8 yes? with the appropriate content-type line. That wouldn't matter, Nate. It's an image (and already rendered as a static graphical object)

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread Daniel Brown
On Thu, Feb 28, 2008 at 9:17 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote: > before going any further, your HTML page is in UTF-8 yes? with the > appropriate content-type line. That wouldn't matter, Nate. It's an image (and already rendered as a static graphical object). Page encoding won't

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-29 Thread Frank Arensmeier
29 feb 2008 kl. 03.41 skrev David Sveningsson: Nathan Rixham skrev: before going any further, your HTML page is in UTF-8 yes? with the appropriate content-type line. Yes, apache uses only utf-8 as charset and the html content-type meta tag is set to utf-8 too. Also, the html form validates

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-28 Thread David Sveningsson
Nathan Rixham skrev: before going any further, your HTML page is in UTF-8 yes? with the appropriate content-type line. Yes, apache uses only utf-8 as charset and the html content-type meta tag is set to utf-8 too. Also, the html form validates at validator.w3.org plus: first debugging step

[PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-28 Thread Nathan Rixham
Nathan Rixham wrote: David Sveningsson wrote: Hi, I've ran into some problems when outputing text to an image using imagettftext. I cannot get swedish characters to work, I just get a square. I've tried different fonts which I know has those characters (bitstream vera, arial, times new roman,

Re: [PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-28 Thread David Sveningsson
Nathan Rixham skrev: try changing: imagettftext( $im, $title_size, 0, 50, 50, $white, $font, $title ); to: imagettftext($im, $title_size, 0, 50, 50, $white, $font, utf8_decode($title)); It draws lesser squares, but no characters (except for the regular alphanum characters which is rendered

[PHP] Re: imagettftext and utf-8 (swedish characters)

2008-02-28 Thread Nathan Rixham
David Sveningsson wrote: Hi, I've ran into some problems when outputing text to an image using imagettftext. I cannot get swedish characters to work, I just get a square. I've tried different fonts which I know has those characters (bitstream vera, arial, times new roman, etc). What am I doing