Jump to content


problem with čšž letters in email


8 replies to this topic

#1 HEki_

    Young Padawan

  • Members
  • Pip
  • 165 posts

Posted 13 August 2007 - 03:44 AM

Ok,
i tried everything. i changed the database charsets, changed everything manual in database, changed the charset on outgoing mail, changed the charset in my outlookexpress ...
no success whatsoever :P

can someone help me out and point me into a direction i can fix this problem?

best regards,
heki

#2 Friiks

    Young Padawan

  • Members
  • Pip
  • 56 posts
  • Gender:Male
  • Location:Latvia
  • Interests:Guitar, music, having all sorts of fun...and well enjoying my life (as enjoyable as it can be) as good as I can :D<br /><br />Oh yea, and of course - http://snowmoons.com

Posted 13 August 2007 - 05:01 AM

Setting right charset should fix that.
What language are the emails?
I suggest using utf-8 for database & emails but if you do the text has to be utf-8 encoded.

#3 HEki_

    Young Padawan

  • Members
  • Pip
  • 165 posts

Posted 13 August 2007 - 05:49 AM

thx i will try again ... :P

#4 HEki_

    Young Padawan

  • Members
  • Pip
  • 165 posts

Posted 13 August 2007 - 07:49 AM

:huh: :P :wacko: :beat: :bs: :bashhead:

stupid thing still doesnt work. Ok can u answere me this. If i setup everything for utf-8 and than a user has in his email to show all emails in windows-1250, that means the info wont be shown correctly right? he has to use utf-8 to see čžš. There isnt a single charset like "superwins" that would show the same letters typed eather in windows-1250 or utf-8??

desperate phpnoobiewithcharsetproblebsalldaylong

#5 nitr0x

    Young Padawan

  • Members
  • Pip
  • 201 posts

Posted 13 August 2007 - 12:50 PM

If you can't get it to work, you could try their html entity instead.

č - & #269; (268 for capital)
ž - & #382; (381 for capital)
š - & #353; (252 for capital)

Just make sure you take away the space between the & and #.

You should be able to use PHP to change them.

Edited by nitr0x, 13 August 2007 - 12:53 PM.


#6 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 14 August 2007 - 11:59 AM

http://php.net/manua...tmlentities.php

Run through the user comments on that page. I'm sure you'll be able to piece together something of some use for doing that automatically.

Edited by rc69, 14 August 2007 - 11:59 AM.


#7 HEki_

    Young Padawan

  • Members
  • Pip
  • 165 posts

Posted 20 August 2007 - 02:39 AM

ok thx,
i got this problem sorted out now :) however a new problem appeared!

http://www.hurring.c...php/html_email/ <--- i fallowed this example to send email like html. charset and everything is set up in that code. it shows my čžš letters also. But when using this code, the emails i sent have in "from" line my servers email ...

my email code:
mail("$user[ur_mail]",$naziv,$msg_body,$headers);

and i put:
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=windows-1250\r\n";
$headers .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"style1.css\">";
$headers .= "From: $admin_email";

and this prints the right email address inside of each email in the body of html ... I need this "From: $admin_email"
to show in the from line of the email and not in the body :S

thx

#8 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 20 August 2007 - 11:48 AM

$headers .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"style1.css\">";
HTML is not allowed inside the headers unlike html's <head> block.

I don't know a work around for this, but if you find one, you'll have to make sure the absoute path to your style sheet is used (that is assuming a link like that is possible inside e-mails).

#9 HEki_

    Young Padawan

  • Members
  • Pip
  • 165 posts

Posted 21 August 2007 - 04:16 AM

yes,
absolute path does link to .css style. Still trying to get that "From" into the code >.<





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users