SitePoint Sponsor |
|
User Tag List
Results 1 to 19 of 19
Thread: mysql/php and other languages
-
Apr 17, 2001, 20:25 #1
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I want to make my program work in other languages and accept input into the database from other lanaguages and perhaps in different alphabets. I am looking for some informaton/tutorial on this subject but have no idea where to start, some searches i tried revealed nothing. Any suggestions?
-
Apr 17, 2001, 20:49 #2
- Join Date
- Apr 2001
- Location
- Malaysia
- Posts
- 95
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm not sure what you mean here. Can you explain further ? This is not detail enough.
What is the language you are talking about here? Is it other programming languages or just normal languages like Chinese, Japanese, France ....Ngu I.P.
Web Developer
-
Apr 17, 2001, 20:58 #3
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
sorry, languages such as French, Japanese etc ...
is there any problem with mysql and php with for example french special charcters (ones with accents)? do i have to change anything to put them in the database? how about using completly different character sets such as japanase?
bascially my plan is to seperate a lot of the navigation elelments from the site by using "langauge sets" that would be stored inside mysql - so i need to know if i am going to have any problems using these before i embrak on trying!
-
Apr 18, 2001, 00:54 #4
- Join Date
- Mar 2001
- Posts
- 3,537
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
lol...I must have missed the part where php asks me what language I speak before it parses any of my files.
-
Apr 18, 2001, 03:33 #5
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
so it works with any character set without changing anything?
the reason i ask is that at gossamer-threads there is often talk of making the script work in other languages and changes to the code these people have to make, so i thought that might make a difference in php/mysql somewhere as well.
Sorry 7stud if this is a silly question for you but I am sure you don't know everything either.
-
Apr 18, 2001, 09:44 #6
- Join Date
- Apr 2001
- Location
- Malaysia
- Posts
- 95
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I think it shouldn't be any problem.. I have never try this before... but it shouldn't be limited by the language system.
I mean Mysql is such a powerful system... from my experience with chinese language, usually if you cannot display the languages... you just need to do some setting in the meta tag and set the language set.. can liao
Example:-
English
------
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Chinese (Simplified)
------------------
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
Japanese
---------
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
Hope this help :PNgu I.P.
Web Developer
-
Apr 18, 2001, 09:55 #7
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thank you, i will certainly try it.
-
Apr 18, 2001, 13:39 #8
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What you need here is "Unicode" support. Unicode is like the ultimate character set - ASCII (the standard language encoding that's been about for ages) stores characters as 8 bits (on or off elements) - that allows it to represent 256 characters. While this is enough for the standard english alphabet plus extra characters when you think about a language like chinese ASCII just doesn't cut it.
Unicode stores characters as 16 bits, and can thus be used to represent 65,535 characters. It can therefore be used to represent every character of every language ever created - and is probably what you need for your project.
http://www.unicode.org/
Perl, Java and XML all have full support for XML - unfortunately as far as I can tell PHP doesn't. PHP does have functions to deal with XML though so it might be feasible to use XML for the data in your application and process it using PHP. I don't think mySQL supports Unicode either - however Oracle and MS SQL do. There's a full list of programming languages and databases that have unicode support here:
http://www.unicode.org/unicode/onlinedat/products.html
-
Apr 18, 2001, 18:14 #9
- Join Date
- Apr 2001
- Location
- Malaysia
- Posts
- 95
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Shunk,
I don't know much about unicode.. but last nite my friend just told me that MySQL did support unicode... is this true ?
We are thinking of developing a chinese website using mysql & php also....Last edited by nguip; Apr 18, 2001 at 18:17.
Ngu I.P.
Web Developer
-
Apr 18, 2001, 18:25 #10
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i am not sure but dosen't dmoz.com use mySQL and they have chinese language section ....
-
Apr 18, 2001, 18:42 #11
- Join Date
- Apr 2001
- Location
- Malaysia
- Posts
- 95
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hmm... interesting
But I don't find Mysql and php name appear in the unicode list here.Ngu I.P.
Web Developer
-
Apr 19, 2001, 03:34 #12
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I did a search for Unicode on the mysql.com site, and the only reference to it I found was on the "TODO" page. It looks like it's a feature they want to add but haven't implemented yet. There are plenty of other databases that support Unicode though (some of them open source) - see the list on the Unicode site for details.
-
Apr 19, 2001, 05:07 #13
- Join Date
- Apr 2001
- Location
- Malaysia
- Posts
- 95
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ic...
So... maybe we just cannt use it for other languages is it?Ngu I.P.
Web Developer
-
Apr 19, 2001, 05:19 #14
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
sounds like we can't. But it is only other character sets that are the problem i assume, there is no problem with accented characters like in french are there... i hope...
-
Apr 19, 2001, 05:31 #15
- Join Date
- Apr 2001
- Location
- Malaysia
- Posts
- 95
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Padders..
Are you going to have a try ? I'd like to know whether it work or not.
I got no time to look into this yet... but I'll definitely want to try this on chinese system....
Ngu I.P.
Web Developer
-
Apr 19, 2001, 09:34 #16
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i will, i am still working out the best way to do what i want with words, should i just load one big array for them and where store them etc... once i have worked out how to do that i will try different languages and see what happens.
-
Apr 19, 2001, 09:45 #17
Why use other languages when 47.5% of the net are english (according to Global Research taken from NEWSWEEK)?
-
Apr 19, 2001, 11:35 #18
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by daemon
Why use other languages when 47.5% of the net are english (according to Global Research taken from NEWSWEEK)?
chinese is set to overtake as the prominant web language by 2004 (according to accenture) are you going to drop english at that point and switch to just chinese?
-
Apr 19, 2001, 19:25 #19
- Join Date
- Apr 2001
- Location
- Malaysia
- Posts
- 95
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I guess the language that you are using for the website is pretty much depend on your website target group.
The main recent I want to develop this chinese website is that it's basically targeting to the chinese communitee.
I don't see it will be any different with whatever statistic is that. We are not developing a portal like yahoo... but rather a website for targeting to a niche group.
So... am I making clear enough here ?Ngu I.P.
Web Developer
Bookmarks