Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
electric-fire

An Issue When Using Non English Language For A Category Name (Coffee Shop Site)

Recommended Posts

Hello

 

I was following all the instruction in the book and built the coffee shop website in english without too much trouble.

 

But now when I decided to create a similar website and use Russian language to fill the content, I've got an issue error 404 message when opening a product page (the browse.php file).

 

So here is the full explanation:

 

First I go to the home page:

 

http://localhost/stroymateriali/

 

 

And click on the list of categories:

 

http://localhost/stroymateriali/shop/standalones/

 

 

Next when I try to open a list of products in this category

 

http://localhost/stroymateriali/browse/standalones/замки+внутренние/1

 

I have "Object not found!" error 404 message.

 

 

But if I rename the category from 'замки внутренние' to 'zamki vnutrenie' the same phrase written using Latin letters everything starts to work,

 

I have the following URL instead:

 

http://localhost/stroymateriali/browse/standalones/zamki+vnutrenie/1

 

 

The problem is that the name of the category must be written only with Russian letters in order for a website to be readable by Russians.

 

If someone knows a solution, please help me on this problem.

Thank you

Share this post


Link to post
Share on other sites

Sounds like you have an issue with the encoding you are using. Most sql installations default to utf-8-general-ci or latin-swedish-ci. I am not familiar with the encoding used for russian characters. You will need to find out what charset the russian alphabet uses, then ensure that your database and sql encoding matches. Searching online should bring up some answers for you.

  • Upvote 1

Share this post


Link to post
Share on other sites

Make sure your site, script and servers all support and use the same character encoding. UTF-8 is the best bet since it handles virtually everything. look into how to explicitly send file encoding in Apache, how to specify character encoding in php output and insertion into a mysql table, and how to properly setup tables store UTF-8 by default in mySQL. I had similar problem with latin characters being input from a windows browser output as garbage everywhere else because a few columns had the wrong encoding. I ended up having to write a convertor to UTF-8 that detected the browser’s platform and tries to determine the encoding if not obvious, that way all stored data conforms to UTF-8 encoding. Everything: Apache, PHP & mySQL all should be explicitly configured to output and store UTF-8 incase the server or server software is changed.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...