Thread: UTF8 and Number

Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2008
    Posts
    31
    Plugin Contributions
    0

    Default UTF8 and Number

    Hi All,

    I am trying to customize zencart with UTF8. As far as displaying information, search etc everything goes well except Numbers

    In Customer Registration form, if a user gives dates in UTF8 (like Hindi) language format it can not recognize it as proper date. It has to be in English.....why is it like that? Is it that all number should be in English?

    Is there any solution to this behaviour?

    Regards,

    nnitin

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: UTF8 and Number

    The numbers that you describe as English (1,2,3, ...) are not actually so. They are in fact originally from Arabic, but proved so useful that they have been adopted and used not only by Western languages, but also many Eastern languages, even those where there are longer-established alternatives (e.g. Japanese).

    From your post Hindi would seem to be an exception to this. Dates will still need to be held in "standard international format" in the database, i.e. "yyyy-mm-dd", but you may be able to convert what visitors to your site see by changing the date functions in your hindi.php language file.

    These are the functions that convert those internal dates into say mm/dd/yyyy for Americans and dd/mm/yyyy for most other people and can hopefully be adapted to convert them into hindi format too.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Oct 2008
    Posts
    31
    Plugin Contributions
    0

    Default Re: UTF8 and Number

    Dear Kuroi,

    Yes! I do understand that there should not be any change if I am using numbers in any language. But it is happening here. If I give ११/२४/१९७० which reads in English as 11/24/1970 it gives me error. If I give २४/११/१९७० which reads in English as 24/11/1970 even then it gives error. If I input the date in 11/24/1970 in English it accepts.

    I do not think it is due to dd/mm/yyyy or mm/dd/yyyy.

    What could be the reason?

    Regards,

    nnitin

  4. #4
    Join Date
    Oct 2005
    Location
    Finland
    Posts
    186
    Plugin Contributions
    1

    Default Re: UTF8 and Number

    Hi nnitin,

    does this Wiki help you customize the date behaviour in your Hindi language file: http://www.zen-cart.com/wiki/index.php/Date_Format ?

    Guess you need to customize code even more, but it should be doable in the same areas.

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: UTF8 and Number

    Hi nntin

    Unfortunately you haven't said what the error is, so it's difficult to say why it might be ocurring.

    However if I enter 24/11/1970 into a site where I haven't adapted the zen_date_raw() function then I get an error too, even for a site completely built in (non-American) English.

    Rued's link provides a very clear an helpful guide on this if you haven't already done so.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Oct 2008
    Posts
    31
    Plugin Contributions
    0

    Default Re: UTF8 and Number

    Hi Kuroi,

    The error is the one trapped by the program. "The date format is not correct". But it is occurring for both the formats for my language.

    I am confused because it works well for English numbers.
    Regards,

    nnitin

 

 

Similar Threads

  1. Spanish Language Pack (complete and UTF8) for Zen Cart 1.39b
    By torvista in forum Addon Language Packs
    Replies: 133
    Last Post: 10 Aug 2012, 09:49 PM
  2. UTF8 and special characters after upgrade
    By aeolidia in forum Upgrading from 1.3.x to 1.3.9
    Replies: 6
    Last Post: 10 Apr 2011, 09:29 PM
  3. v1.3.9h utf8 new installation right sidebox and bottom footer missing
    By george_usa in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 11 Jan 2011, 06:12 PM
  4. UTF8 and ASCII PHP files Probles?
    By nnitin in forum Addon Language Packs
    Replies: 2
    Last Post: 24 Oct 2008, 12:47 AM
  5. Replies: 3
    Last Post: 4 Sep 2007, 01:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR