/    Sign up×
Community /Pin to ProfileBookmark

Using Japanese and PHP

I’m doing some preliminary research on using Japanese and PHP. The plan is to write a flash card script.

Basically, I know nothing about unicode or multibyte strings. I know how to type in japanese using an IME in MS Word and whatnot, but I have no clue how to easily display Japanese from a browser, receive input through a form in Japanese characters, or do any of the encoding/decoding of mbstrings.

Does anyone know how to do this? Is there a decent free primer/tutorial online (or worse, a book I can buy that covers it)? Or maybe someone could explain it here? My googlings have failed miserably in finding anything that’s really understandable when starting from ground one (decent PHP/MySQL knowledge).

[A little design information, if you’re interested: The general idea is to have the instructor just type in the vocabulary for each chapter, which will be sent to a MySQL database. Then the student can put together a set of flash cards from any of the vocabulary across the chapters (retrieving the data from the database).]

A preemptive thank you to anyone who reads this and takes the time to think about a way they could help, literally anything would be appreciated!

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@sciguyryanSep 15.2004 — I'm not shure but I do not think that you can write variables in Japanese but, storing the datawould be simple, just use htmlentities() and it will convert the code to a browser-readable code.

And the two best places to look would be

www.php.net and www.zend.com


Hope that helps,


RyanJ
Copy linkTweet thisAlerts:
@justin1754authorSep 15.2004 — Yeah, but neither of those sources come close to putting that into layman's terms. I've already tried firuging it out there.
Copy linkTweet thisAlerts:
@sciguyryanSep 16.2004 — [i]Originally posted by justin1754 [/i]

[B]Yeah, but neither of those sources come close to putting that into layman's terms. I've already tried firuging it out there. [/B][/QUOTE]





Ah, I see.

Wel, if you can explain exactly what you want to do I'll do my best to explain how you can do it ?


RyanJ
Copy linkTweet thisAlerts:
@justin1754authorSep 16.2004 — Well, I successfully made a form by setting charset to Shift_JIS that just displays whatever you enter into it, so that much is taken care of ([URL=http://ugoto.calvin.edu/~ja26/japan]http://ugoto.calvin.edu/~ja26/japan[/URL]).

Now I just need to know what I need to do to put something in Japanese in a MySQL database. Will it just work automatically? Is there a setting I need to make sure is set to a specific value? The reason I ask this is that my server has already been tweaked (it's a test server), and I need to know what settings to relay to the enterprise server manager when I'm actually moving my content onto that server (e.g. That's something that just "trying and seeing that it works" doesn't tell me).

Thanks a lot for any information on this you can provide!
Copy linkTweet thisAlerts:
@sciguyryanSep 18.2004 — Well, I would not suggest adding the directlyinto the database in their unprocessed form but, instead try using this function:

htmlentities ("String Here", ENT_QUOTES, Shift_JIS]);


That will work to convert the characters to HTML entities which then will be displayed as characters by the browser.


Hope that helps,

RyanJ
×

Success!

Help @justin1754 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...