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 6981347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:08:44+00:00 2026-05-27T18:08:44+00:00

I am getting Windows-1256 encoded text from the web and nee to convert it

  • 0

I am getting Windows-1256 encoded text from the web and nee to convert it to utf-8.

I tried using mb_convert_encoding and iconv but they don’t seem to work.

none of them seem to be capable of handling windows-1256.

How to do it?

Edit: More details about the errors.
When trying

mb_convert_encoding($text,"utf-8", "windows-1256");

I get

Message: mb_convert_encoding() [function.mb-convert-encoding]: Illegal character encoding specified

And when i try

iconv("windows-1256", "utf-8", $text);

I get no errors but it returns an empty string

  • 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-27T18:08:45+00:00Added an answer on May 27, 2026 at 6:08 pm

    Check this:
    http://rayed.com/wordpress/wp-content/upload/lib.utf2win.php.txt

    Apparently he also had some problems, because he wrote this script, if you can reverse that, it might work.

    I reversed it for you, try that:

    $f[]="\xc2\xac";  $t[]="\x80";
    $f[]="\xd9\xbe";  $t[]="\x81";
    $f[]="\xc0\x9a";  $t[]="\x82";
    $f[]="\xc6\x92";  $t[]="\x83";
    $f[]="\xc0\x9e";  $t[]="\x84";
    $f[]="\xc0\xa6";  $t[]="\x85";
    $f[]="\xc0\xa0";  $t[]="\x86";
    $f[]="\xc0\xa1";  $t[]="\x87";
    $f[]="\xcb\x86";  $t[]="\x88";
    $f[]="\xc0\xb0";  $t[]="\x89";
    $f[]="\xd9\xb9";  $t[]="\x8a";
    $f[]="\xc0\xb9";  $t[]="\x8b";
    $f[]="\xc5\x92";  $t[]="\x8c";
    $f[]="\xda\x86";  $t[]="\x8d";
    $f[]="\xda\x98";  $t[]="\x8e";
    $f[]="\xda\x88";  $t[]="\x8f";
    $f[]="\xda\xaf";  $t[]="\x90";
    $f[]="\xc0\x98";  $t[]="\x91";
    $f[]="\xc0\x99";  $t[]="\x92";
    $f[]="\xc0\x9c";  $t[]="\x93";
    $f[]="\xc0\x9d";  $t[]="\x94";
    $f[]="\xc0\xa2";  $t[]="\x95";
    $f[]="\xc0\x93";  $t[]="\x96";
    $f[]="\xc0\x94";  $t[]="\x97";
    $f[]="\xda\xa9";  $t[]="\x98";
    $f[]="\xc4\xa2";  $t[]="\x99";
    $f[]="\xda\x91";  $t[]="\x9a";
    $f[]="\xc0\xba";  $t[]="\x9b";
    $f[]="\xc5\x93";  $t[]="\x9c";
    $f[]="\xc0\x8c";  $t[]="\x9d";
    $f[]="\xc0\x8d";  $t[]="\x9e";
    $f[]="\xda\xba";  $t[]="\x9f";
    $f[]="\xd8\x8c";  $t[]="\xa1";
    $f[]="\xda\xbe";  $t[]="\xaa";
    $f[]="\xd8\x9b";  $t[]="\xba";
    $f[]="\xd8\x9f";  $t[]="\xbf";
    $f[]="\xdb\x81";  $t[]="\xc0";
    $f[]="\xd8\xa1";  $t[]="\xc1";
    $f[]="\xd8\xa2";  $t[]="\xc2";
    $f[]="\xd8\xa3";  $t[]="\xc3";
    $f[]="\xd8\xa4";  $t[]="\xc4";
    $f[]="\xd8\xa5";  $t[]="\xc5";
    $f[]="\xd8\xa6";  $t[]="\xc6";
    $f[]="\xd8\xa7";  $t[]="\xc7";
    $f[]="\xd8\xa8";  $t[]="\xc8";
    $f[]="\xd8\xa9";  $t[]="\xc9";
    $f[]="\xd8\xaa";  $t[]="\xca";
    $f[]="\xd8\xab";  $t[]="\xcb";
    $f[]="\xd8\xac";  $t[]="\xcc";
    $f[]="\xd8\xad";  $t[]="\xcd";
    $f[]="\xd8\xae";  $t[]="\xce";
    $f[]="\xd8\xaf";  $t[]="\xcf";
    $f[]="\xd8\xb0";  $t[]="\xd0";
    $f[]="\xd8\xb1";  $t[]="\xd1";
    $f[]="\xd8\xb2";  $t[]="\xd2";
    $f[]="\xd8\xb3";  $t[]="\xd3";
    $f[]="\xd8\xb4";  $t[]="\xd4";
    $f[]="\xd8\xb5";  $t[]="\xd5";
    $f[]="\xd8\xb6";  $t[]="\xd6";
    $f[]="\xd8\xb7";  $t[]="\xd8";
    $f[]="\xd8\xb8";  $t[]="\xd9";
    $f[]="\xd8\xb9";  $t[]="\xda";
    $f[]="\xd8\xba";  $t[]="\xdb";
    $f[]="\xd9\x80";  $t[]="\xdc";
    $f[]="\xd9\x81";  $t[]="\xdd";
    $f[]="\xd9\x82";  $t[]="\xde";
    $f[]="\xd9\x83";  $t[]="\xdf";
    $f[]="\xd9\x84";  $t[]="\xe1";
    $f[]="\xd9\x85";  $t[]="\xe3";
    $f[]="\xd9\x86";  $t[]="\xe4";
    $f[]="\xd9\x87";  $t[]="\xe5";
    $f[]="\xd9\x88";  $t[]="\xe6";
    $f[]="\xd9\x89";  $t[]="\xec";
    $f[]="\xd9\x8a";  $t[]="\xed";
    $f[]="\xd9\x8b";  $t[]="\xf0";
    $f[]="\xd9\x8c";  $t[]="\xf1";
    $f[]="\xd9\x8d";  $t[]="\xf2";
    $f[]="\xd9\x8e";  $t[]="\xf3";
    $f[]="\xd9\x8f";  $t[]="\xf5";
    $f[]="\xd9\x90";  $t[]="\xf6";
    $f[]="\xd9\x91";  $t[]="\xf8";
    $f[]="\xd9\x92";  $t[]="\xfa";
    $f[]="\xc0\x8e";  $t[]="\xfd";
    $f[]="\xc0\x8f";  $t[]="\xfe";
    $f[]="\xdb\x92";  $t[]="\xff";
    
    function win_to_utf8($str) {
      global $f, $t;
      return str_replace($t, $f, $str);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anybody tried here using Getting Real(37Signals) approach to develop windows application? (C#/.NET). Or simply
I have problem with getting username form windows system. I tried using getlogin function
Exact Duplicate of: Getting the size (free,total) of a Windows Mobile phone drive using
authentication problem on windows vista (iis7) (cookie is getting written but httpcontext.current.user is null)
How would I go about getting the Windows user credentials from a Swing application?
Getting two different modification time when calculated from different Python versions on Windows XP.
I am getting the following error when using Windows 7. I started seeing this
I am getting #error WINDOWS.H already included. MFC apps must not #include windows.h But
I have installed svn console client from these binaries - http://subversion.tigris.org/getting.html#windows - 1.5.6, 1.6.4,
alt text http://img63.imageshack.us/img63/5726/screenshot20100125at124.png I keep getting multiple error windows for an app i'm developing

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.