views:

105

answers:

1

I have an ASP.NET MVC application and I want to make links written in Cyrillic within the application. What are possible pitfalls from the developing point of view?

To be more precise: now the link looks like:
    http://mysite.ru/books
and I want to make it look like:
    http://mysite.ru/книги
or maybe even:
    http://мойсайт.ру/книги

An the next question can I use both URLs and which will be the attitude of Google and other search engines

EDIT: Well I wouldn't ask if it was't possible check this out http://www.codeisart.ru/%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B5-%D0%B1%D1%83%D0%BA%D0%B2%D1%8B-%D0%B2-url-google-%D0%B8-yandex/ Yes it look strange here but in browser the URL is written right in russian.At least on my PC.

+2  A: 

According to W3C URI's in non ASCII should be escaped to %D1%81 style. I have looked in html sources of ru.wikipedia.org all uri's are escaped, but there is a feature of some of the new browsers - convert this escaped uri's to UTF8 and they sometimes displays as normal cyrylic. Arguable feature.

As about MVC, I have just tried for my routing {languageCode}/{controller}/{action}/{id} perform something like http://servername.com/ru/articles/show/статья1 and it passes to action...

  public ActionResult Show(String id)

... normal utf8 Cyrillic string in id param.

http://мойсайт.ру/книги :-)

Andrey Tkach