Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problems with Polish letters
doodlebug
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 16.09.2010

Ostrzeżenie: (0%)
-----


Hello All!
Apologies for my lack of Polish and apologies if this has gone in the wrong forum.
I'm creating a website where you enter your details in text boxes on an .html page, which you then review on a .php page.
Everything has been changed to utf-8.

The problem is when you enter Polish characters in the text box, on the next page when you review the information and say whether it's good or not, the Polish characters show up as "Auml�Auml�Auml�Aring�"

Any idea what the problem could be?

Many thanks in advance
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
doodlebug
post
Post #2





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 16.09.2010

Ostrzeżenie: (0%)
-----


Thanks for the suggestion Mandragorek - but no luck (IMG:style_emoticons/default/sad.gif)



dariuszp - thanks for the suggestion.

The meta tags are all utf 8, charsets are all UTF 8 on all pages -php and html
database: MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf-8_unicode_ci

I tried preg_replace and used htmlspecialchars but it still didn't work.

I tried changing the charset to iso-8859-2 and that just messed up the whole page

LATEST NEWS*********

The code now looks like:
  1. $string1 = isset($_POST['firstname']) ? htmlentities($_POST['firstname']) : false;
  2.  
  3. if(empty($string1))
  4. {
  5.  
  6. echo("<h2>Imię:<font color=red>Prozsę wypełnić</font></h2>\n");
  7. $showbutton=1;
  8. }
  9. else
  10. {
  11. $firstname = preg_replace ("[^0-9a-zA-Z?ąćęłńóśżźĄĆĘŁŃÓŚŻŹ ]", "", $string1);
  12. $firstname = htmlspecialchars($firstname, ENT_COMPAT, 'UTF-8');
  13. echo("<h2><span class=profile>Imię:</span> <font color=#04B404>" . $firstname .
  14.  
  15. "</font></h2>\n");
  16. echo("<input type=hidden name=firstname value=" . $firstname . ">");


This now produces a blank field rather than symbols - any ideas what's going on?

Ten post edytował doodlebug 17.09.2010, 13:56:35
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 29.12.2025 - 07:12