CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: well90

Search: Search took 0.01 seconds.

  1. My send() socket call iis taking its own sweet time

    Hi,

    I have a TCP server that handles more than 100 clients.
    I keep getting bottlenecks and i narrowed it down to the send() winsock function.
    A send() winsock call sometimes takes 100~300ms to...
  2. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    If you look in your web links that you gave me, you will see that the first character in UTF8 is 0xE0 0xB8 0xAA, just like i hardcoded in my code, and the UTF16 is 0E2A, just like you read from your...
  3. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    Because you saved your file in Unicode format already.
    Mine is in UTF8.
    UTF8 format takes from 1 to 3 bytes and in my case, all of my characters takes 3 bytes.
    After the conversion they should all...
  4. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    With your 'szText1', i encoded in unicode and wrote to file and i can read the text successfully.

    Now i test with thai text and still get the same bad output.



    WCHAR wText[1000];
    char*...
  5. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    Weird, why this site encode that 'é' with 0xE9 ?
    http://people.physics.anu.edu.au/~mxk121/javascript/jsUTF8.html
  6. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    After telling Notepad++ that the encoding is "UCS-2 Little Endian", i see this "t�st", except the � is a cube.

    Another test:



    wprintf(L"Member Name: %ls \n", wText); // Prints 't?st'
  7. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    Ok, I have better example so you can stop making doubts on MySQL.



    char* szTest1 = "t\xE9st"; // tést
    WriteToFile("Test1.txt", szTest1);


    I open Test1.txt in notepad and I DO SEE "tést".
  8. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    I cant write thai characters in a simple char[] object, the compiler replace those chars with questions marks.
    This code:



    char* szTest1 = "สุดสุดสุดสุดสุด";
    CLogger::WriteToFile("Test1.txt",...
  9. Replies
    20
    Views
    3,432

    Re: UTF8 Conversion problem

    res and GetString() are MySQL objects, they are used to retreive the UTF8 string and they works as i mentioned in my post, i saved the UTF8 string using WriteToFile() and then opened in notepad++...
  10. Replies
    20
    Views
    3,432

    UTF8 Conversion problem

    Hi,

    I am retrieving a string from the MySQL database as UTF8.
    Now ofcourse i checked if the string itself is ok by writing the retrieved string to a file and opened it in notepad++ under UTF8...
Results 1 to 10 of 10





Click Here to Expand Forum to Full Width

Featured