FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Storing multiple character set types (or a representation of em) in a table column
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Storing multiple character set types (or a representation of em) in a table column [message #172691] Fri, 25 February 2011 13:27 Go to previous message
bizt is currently offline  bizt
Messages: 2
Registered: February 2011
Karma:
Junior Member
Hi,

I'm currently building an online tool designed to help users learn a
foreign language. It's aim is to allow the user to enter their own
vocabulary and they can quiz themselves. This involved entrering their
native word and then the foriend language equivelent. Kind of a
flashcard system but restricted to the words that the user has
previously entered - perhaps specific to the textbook they're
currently learning.

One of the things I want to allow is to support multiple character
sets though (e.g. alphanumeric, japanese, chinese...). I don't want
the system to be specific to a single character set (I'm currently
learning Japanese and want to use the system myself - so want to be
able to support english and japanese charcter sets). when designing my
database table columns I have to specify which character set the text
is though as I don't know any better. I understand why this is but
this is the first time I've ever wanted to have a single text field
support multiple character sets - or at least some representation of
them so I can turn them back to the original format when required.

What's the best way to do this? One idea is some way that I can store
the text in standard abc123... characters but specify in another field
what character set it is. So, when I am inserting my script will
detect which charcter set it is, take a note, encode to a abc123...
representation of it and then do the INSERT. Along side the abc123..
entry in another field I'll state the original character set so when i
need the data I'll decode the abc123... representation to it's
original form.

Anyway I've posted this in the PHP forum as with this technique above
it doesn't require me to do anything different to the database but
instead handle the encoding and decoding in the php script .. if
that's the best technique? How might this done in PHP? If anyone has
any suggestions I'd really appreciate it if you could reply.

Thanks
Burnsy
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: terminate a PHP script
Next Topic: Proxy to open blocked sites
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Jul 01 10:10:01 GMT 2024

Total time taken to generate the page: 0.04981 seconds