Pages:

Order e-mail to admin cannot display danish chars QC 3.2

webby

No avatar

2009-06-08 08:22

Hi again

It works now!

The right form for the danish in language in trash.php is:

function change2Latin( $sContent ){
return str_replace(
Array( '&#230', '&#248', '&#229', '&#198', '&#216', '&#197', ),
Array( '&aelig', '&oslash', '&aring', '&AElig', '&Oslash', '&Aring', ),
$sContent

Thanks for your help beholder!

Webby :)

webby

No avatar

2009-06-08 08:43

Hi beholder

Damm I was to fast... It only works because my mailprogram is in the "utf-8" mode now, but I think most of the danish mailboxes is in the "Western ISO 8859-1" mode?

What can I do then? Can I send you the file trash.php so you can check it - or...?

Thanks :)

Webby :)

beholder

Avatar: beholder

2009-06-08 12:50

the point of the change2latin function is to REMOVE all foreign characters and replace them with ASCII equivalents (basically English alphabet).

So there should be no problem with encoding at all. If you still have a problem, please contact me on my email (find it on this forum) and we'll go from there.

IMO, you don't have your change2Latin correct. The second line should only be characters like "o", "i", "n", etc. NOT &oslash, etc.

webby

No avatar

2009-06-08 14:45

Hmm - now I have done as you told (I hope)...? But still the same problem in the ordermails etc. I receive !?

:)

Webby :)

beholder

Avatar: beholder

2009-06-08 15:51

let me check your website..

beholder

Avatar: beholder

2009-06-08 15:54

you still didn't do it right! your change2Latin() doesn't work as should.

your URLs still look like this:
http://www.campingxperten.dk/?d%C3%B8rl%C3%A5se,90

the above URL should look like this:
http://www.campingxperten.dk/?dorlase,90

Plase post here your whole change2Latin so I may see how it looks...

webby

No avatar

2009-06-08 20:20

Okay - here et is:

function change2Latin( $sContent ){
return str_replace(
Array( '&#230', '&#248', '&#229', '&#198', '&#216', '&#197', ),
Array( 'æ', 'ø', 'å', 'Æ', 'Ø', 'Å', ),
$sContent

Thanks.

Webby :)

webby

No avatar

2009-06-08 20:25

or the hole code is here:

function change2Latin( $sContent ){
return str_replace(
Array( '&#230', '&#248', '&#229', '&#198', '&#216', '&#197', ),
Array( 'æ', 'ø', 'å', 'Æ', 'Ø', 'Å', ),
$sContent
);
} // end function change2Latin

Webby :)

silaswulff

Avatar: silaswulff

2009-06-08 22:12

I solved my problem by following the instructions in the topic cgan spoke of in the first comment - if anyone still have the problem...

beholder

Avatar: beholder

2009-06-09 00:12

webby, this code is wrong.
it should look a little bit like this:

function change2Latin( $sContent ){
return str_replace(
Array( '&#230', '&#248', '&#229', '&#198', '&#216', '&#197', ),
Array( 'o', 'i', 'a', 'u', 'e', 'y', ),
$sContent
);
} // end function change2Latin

notice the second line, it contains only ASCII characters. For God's sake check out what ASCII is, because you're constantly getting this wrong.

webby

No avatar

2009-06-09 10:23

I'm trying for god's sage ;)

Thanks.

Webby :)

Pages:
Back to top
about us | contact