Welcome Guest, Not a member yet? Register   Sign In
Polish Characters break my application!
#1

[eluser]JasonS[/eluser]
Hi,

Here is my problem.

The form works like this.

1) Submit Form
2) Form Validates
2a) If form data is correct -> data is put in a session -> a session field called confirm is set to true.
2b) If form data is invalid -> data is put in a session -> confirm is set to false and user is punted back to form.

If I enter all English characters into my form it works fine.

If I enter a polish character: ł it doesn't work.

I have chased the problem.

On the form page, the session is set whether you enter polish or English characters. You can print this session out using $this->session->userdata before you are redirected. It is all correct.

When you are redirected, if you have English characters the session data is kept and it all works fine. If you have a polish character the session data vanishes.

Does anyone have any idea on what may cause this?

I don't know what version of CI the company is using (don't have access to it.) The script uses form_validation so it can't be that old.
#2

[eluser]JasonS[/eluser]
Has anyone got any ideas here?
#3

[eluser]tonanbarbarian[/eluser]
are you using database sessions or not?
look in the application/config/config.php
$config['sess_use_database'] = TRUE;

If you are using sessions in the database then you need to check that the table fields are UTF8 encoded, or some form of encoding that will store the characters correctly
#4

[eluser]JasonS[/eluser]
I wouldn't have thought of that, I will check thanks.
#5

[eluser]JasonS[/eluser]
I have looked further into this.

The session data is saved to the database, a cookie is set on the users computer. When the page is redirected both still exist but for some reason they do not connect to one another.




Theme © iAndrew 2016 - Forum software by © MyBB