batskeets: (spoon)
[personal profile] batskeets
SO! This year's web guy at JSO is hoping to do a database of some kind for the Career Research section--I've dealt with DBs before, so he's really enthusiastic about this idea.

The thing is, most of the content would be written in Japanese, so I'm not sure if that changes anything. So, I guess my question is: what would be the best way to hold Japanese text in, say, a MySQL database? (or Access, maybe? Those are the only ones I've previously worked with)

Any input is appreciated--I'll be searching out the info myself, but anything that could narrow down the search or steer me in the right direction would be *fantastic*. THANKS! :D

Date: 2003-10-21 06:30 pm (UTC)
From: [identity profile] threeleet.livejournal.com
Just use the normal char/varchar/text datatype. Should set the server to run in UTF-8 mode, and make sure all the data is input as UTF-8. If there's any web forms->submit->insert into db type stuff, then make sure the Content-Type: on the form pages is also UTF-8. Oh, and whatever pulls it out of the DB will have to know that it's UTF-8, too, I suppose (i.e. set the Content-Type: on those pages, a la 'Content-Type: text/html; charset=utf-8').

I would strongly advise against running in any other 'localized' character sets (i.e. SJIS), as these are limited, and eventually you'll need that extra character that isn't included, or to add another language, and it's a lot easier to set it up properly the first time (not that I have any experience w/ that or anything.. <sigh>)

Date: 2003-10-21 06:32 pm (UTC)
From: [identity profile] niro.livejournal.com
What you're going to be worried about is the text encoding. You can do it in MySQL or Access, though I'd avoid Access if I were you, it is evil.

Probably more of a concern is not how to store it in the database but how to work with the data you're storing using whatever tools you're using to access it, such as php or whatever. That's a different topic though. :-P

If this japanese text is going to be intermixed with English text then the easiest way is probably to use UTF-8. If it's going to be pure japanese text (and in fact displayed on a page with pretty much only Japanese) than one of the japanese encodings may yield better results. Do some google searching for UTF-8 and Mysql, and such and you can probably find some pretty good information on it.

I don't remember how easy it is to get working in MySQL, I know in PostgreSQL it's simply a matter of setting the encoding type on the table. In MySQL it might be necessary to fake it somehow and stick large text fields in BLOBs.

Later tonight when I have more time I'll dig through some of the resources I have and see if anything might be useful for you.

March 2017

S M T W T F S
   1234
567891011
1213 1415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 24th, 2026 06:29 pm
Powered by Dreamwidth Studios