osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handle foreign character web input


Hi, Thomas,

On Sat, Jun 29, 2019 at 11:06 AM Thomas Jollans <tjol at tjol.eu> wrote:
>
> On 28/06/2019 22:25, Tobiah wrote:
> > A guy comes in and enters his last name as R?nngren.
> With a capital ? in the middle? That's unusual.
> >
> > So what did the browser really give me; is it encoded
> > in some way, like latin-1?  Does it depend on whether
> > the name was cut and pasted from a Word doc. etc?
> > Should I handle these internally as unicode?  Right
> > now my database tables are latin-1 and things seem
> > to usually work, but not always.
>
>
> If your database is using latin-1, German and French names will work,
> but Croatian and Polish names often won't. Not to mention people using
> other writing systems.
>
> So G?nther and Fran?ois are ok, but Boles?aw turns into Boles?aw and
> don't even think about anybody called ???????? or ????.

As others pointed out - it is very easy to do transliteration especially if
its' not a user registration that will be done.

But I would simply not do that at all - create your forms in English and
accept English spellings only.
Most people that do computers this days can enter phonetic spelling
of their first/last names (even in Chinese/Japanese/Hebrew).

And all European names can be transliterated to English.

Besides as the OP said - if someone comes to him and will
try to enter the non-English name. The OP might not even have the appropriate
keyboard layout to input such a name. And if this is an (time consuming) event
all (s)he can do is ask for phonetic spelling.

Thank you.

>
>
> >
> > Also, what do people do when searching for a record.
> > Is there some way to get 'Ronngren' to match the other
> > possible foreign spellings?
>
> --
> https://mail.python.org/mailman/listinfo/python-list