Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 783309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:31:36+00:00 2026-05-14T20:31:36+00:00

The characters I am getting from the URL, for example www.mydomain.com/?name=john , were fine,

  • 0

The characters I am getting from the URL, for example http://www.mydomain.com/?name=john , were fine, as longs as they were not in Russian.

If they were are in Russian, I was getting ‘����’.

So I added $name= iconv(“cp1251″,”utf-8” ,$name); and now it works fine for Russian and English characters, but screws up other languages. :)))

For example ‘Jānis’ ( Latvian ) that worked fine before iconv, now turns into ‘jДЃnis’.

Any idea if there’s some universal encoder that would work with both the Cyrillic languages and not screw up other languages?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:31:36+00:00Added an answer on May 14, 2026 at 8:31 pm

    Actually this runs down to the problem of how the URL is encoded. If you’re clicking a link on a given page the browser will use the page’s encoding to sent the request but if you enter the URL directly into the address-bar of your browser the behavior is somehow undefined as there is no standardized way on the encoding to use (Firefox provides an about:config switch to use UTF-8 encoded URLs).

    Besides using some encoding detection there is no way to know the encoding used with the URL in the given request.

    EDIT:

    Just to backup what I said above, I wrote a small test script that shows the default behavior of the five major browsers (running Mac OS X in my case – Windows Vista via Parallels in case of the IE):

    $p = $_GET['p'];
    for ($i = 0; $i < strlen($p); $i++) {
        // this displays the binary data received via the URL in hex format
        echo dechex(ord($p[$i])) . ' ';
    }
    

    Calling http://path/to/script.php?p=äöü leads to

    • Safari (4.0.5): c3 a4 c3 b6 c3 bc
    • Firefox (3.6.3): c3 a4 c3 b6 c3 bc
    • Google Chrome (5.0.375.38): c3 a4 c3 b6 c3 bc
    • Opera (10.10): e4 f6 fc
    • Internet Explorer (8.0.6001.18904): e4 f6 fc

    So obviously the first three use UTF-8 encoded URLs while Opera and IE use ISO-8859-1 or some of its variants. Conclusion: you cannot be sure what’s the encoding of textual data sent via an URL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I'm posting via ajax I'm sometimes getting extra characters posted for example. If
I have a problem in getting Hebrew characters from a http get request. I'm
I am hitting a particular URL and getting some response from it. I am
I am getting a URL from server and trying to load the URL in
I am getting the error Conversion failed when converting date and/or time from character
I am seemingly getting random characters, mainly a rogue ! in E-Mails read in
This is for SS 2005. Why I am i only getting 4000 characters and
I'm getting a trailing characters error for the 'for loop' in the following lines
I'm getting an Illegal characters in path error while using XMLTextReader method. Basically, I'm
I am getting echoed Disallowed Key Characters. in my CodeIgniter application when I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.