Results 1 to 3 of 3

Thread: Convert UTF-8 fields

  1. #1
    Join Date
    Apr 2009
    Posts
    40

    Convert UTF-8 fields

    Good evening,

    Well I have a problem that is easily solved by a method not at all optimized but if someone has a simpler and less greedy then i will be glad.

    I am in utf8 or iso I have? in squares for all E E O and other special characters.

    Problem: If I will try to develop my code to put utf8_encode to all my fields, It will take 8 months.

    I tried to put a return utf8_encode (mssql_fetch_array ($ rs)) (among others) but it's an array so it does not help much.

    Method that I would do easily, but given the number of loops that I am already paying in all directions and the number of records that I have in my table, I am afraid that doing that gives me time to answer yet longer than they are currently (and yet, God knows that I opt as I can).

    Please suggest.

  2. #2
    Join Date
    Dec 2008
    Posts
    161

    Re: Convert UTF-8 fields

    You need to have encoder / decoder that if you voluntarily chose to keep working on elements of different encodings.

    That was my case for example when I wanted to make connections to a SQL Server configured to ANSI with one of my projects for all of UTF8.

    Mysql, you need to easily define the encoding of communication with PHP.
    With SQL server, I have not found any method to do so for me it is dependent on the configuration of the server.

    You can choose any stalling on SQL server or to retain a different element in knowing when they should be converted into input and output.

    Once you have selected your encoding, you must make sure
    - Your PHP files are all written in this encoding.
    - Your HTML code indicates that encode head
    - Communication to mysql is not in this encoding (see SET NAMES) and merging the tables is the correct type.

  3. #3
    Join Date
    Jan 2009
    Posts
    143

    Re: Convert UTF-8 fields

    Make sure that utf8_encoder convert UTF8 to iso but if your string is already UTF8, it will be not be convertible.
    You can not use it as if you don't know what encoding you are currently using for other characters .
    Personally I have tried to detect the encoding of a string just to see if I have been able to convert or not and it was very unreliable.

Similar Threads

  1. What are the required fields in Excel?
    By Chini mao in forum Windows Software
    Replies: 2
    Last Post: 06-01-2012, 08:59 PM
  2. How to Use Password Fields in Java?
    By pushpendra in forum Software Development
    Replies: 5
    Last Post: 10-02-2010, 05:46 AM
  3. Why to use set/get methods for private fields?
    By Klaty in forum Software Development
    Replies: 5
    Last Post: 05-01-2010, 12:08 PM
  4. Show all fields except id
    By Xmen in forum Software Development
    Replies: 3
    Last Post: 08-12-2009, 01:56 PM
  5. How to add two fields in ms access?
    By lootera in forum Windows Software
    Replies: 3
    Last Post: 03-09-2009, 09:18 PM

Tags for this Thread

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
  •  
Page generated in 1,713,491,910.55063 seconds with 16 queries