久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <small id='34u8F'></small><noframes id='34u8F'>

      <tfoot id='34u8F'></tfoot>
      <legend id='34u8F'><style id='34u8F'><dir id='34u8F'><q id='34u8F'></q></dir></style></legend>
      <i id='34u8F'><tr id='34u8F'><dt id='34u8F'><q id='34u8F'><span id='34u8F'><b id='34u8F'><form id='34u8F'><ins id='34u8F'></ins><ul id='34u8F'></ul><sub id='34u8F'></sub></form><legend id='34u8F'></legend><bdo id='34u8F'><pre id='34u8F'><center id='34u8F'></center></pre></bdo></b><th id='34u8F'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='34u8F'><tfoot id='34u8F'></tfoot><dl id='34u8F'><fieldset id='34u8F'></fieldset></dl></div>
        <bdo id='34u8F'></bdo><ul id='34u8F'></ul>

    1. 使用 PHP FreeTDS 擴展從 MSSQL 服務器獲取帶有 UTF-

      Getting data with UTF-8 charset from MSSQL server using PHP FreeTDS extension(使用 PHP FreeTDS 擴展從 MSSQL 服務器獲取帶有 UTF-8 字符集的數據)

      • <bdo id='xldrC'></bdo><ul id='xldrC'></ul>
            1. <i id='xldrC'><tr id='xldrC'><dt id='xldrC'><q id='xldrC'><span id='xldrC'><b id='xldrC'><form id='xldrC'><ins id='xldrC'></ins><ul id='xldrC'></ul><sub id='xldrC'></sub></form><legend id='xldrC'></legend><bdo id='xldrC'><pre id='xldrC'><center id='xldrC'></center></pre></bdo></b><th id='xldrC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xldrC'><tfoot id='xldrC'></tfoot><dl id='xldrC'><fieldset id='xldrC'></fieldset></dl></div>

                <legend id='xldrC'><style id='xldrC'><dir id='xldrC'><q id='xldrC'></q></dir></style></legend>

                <small id='xldrC'></small><noframes id='xldrC'>

                <tfoot id='xldrC'></tfoot>

                  <tbody id='xldrC'></tbody>
                本文介紹了使用 PHP FreeTDS 擴展從 MSSQL 服務器獲取帶有 UTF-8 字符集的數據的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我似乎無法使用 FreeTDS 擴展從 MSSQL 中獲取編碼為 UTF-8 的數據.

                I can't seem to get data from MSSQL encoded as UTF-8 using FreeTDS extension.

                連接:

                ini_set('mssql.charset', 'UTF-8');
                $this->_resource = mssql_connect($config['servername'], $config['username'], $config['password']);
                

                我無法使用任何其他擴展程序.

                I have no ability to use any other extension.

                我試過創建 ~/.freetds.conf

                I've tried creating ~/.freetds.conf

                [global]
                client charset = UTF-8
                

                我試過向 php 傳遞參數:

                I've tried passing parameters to php:

                php -d mssql.charset="UTF-8" index.php
                

                數據仍然不是 UTF-8.

                Data is still not in UTF-8.

                php -i

                mssql
                
                MSSQL Support => enabled
                Active Persistent Links => 0
                Active Links => 0
                Library version => FreeTDS
                
                Directive => Local Value => Master Value
                mssql.allow_persistent => On => On
                mssql.batchsize => 0 => 0
                mssql.charset => no value => no value
                mssql.compatability_mode => Off => Off
                mssql.connect_timeout => 5 => 5
                mssql.datetimeconvert => On => On
                mssql.max_links => Unlimited => Unlimited
                mssql.max_persistent => Unlimited => Unlimited
                

                想法?

                推薦答案

                MSSQL 和 UTF-8 在……有時是相當痛苦的.我不得不手動轉換它.問題:MSSQL 實際上并不知道和支持 UTF-8.

                MSSQL and UTF-8 are quite a pain in the ... sometimes. I had to convert it manually. The problem: MSSQL doesn't actually know and support UTF-8.

                從數據庫值轉換為 UTF-8:

                Convert from database value to UTF-8:

                mb_detect_encoding($value, mb_detect_order(), true) === 'UTF-8' ? $value : mb_convert_encoding($value, 'UTF-8');
                

                從 UTF-8 轉換為數據庫值:

                Converting from UTF-8 to database value:

                mb_convert_encoding($value, 'UCS-2LE', mb_detect_encoding($value, mb_detect_order(), true));
                

                幸運的是我使用了 Doctrine,所以我所要做的就是創建一個自定義的 StringType 實現.

                Fortunately I was using Doctrine so all I had was to create a custom StringType implementation.

                這篇關于使用 PHP FreeTDS 擴展從 MSSQL 服務器獲取帶有 UTF-8 字符集的數據的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                    <bdo id='cQZSX'></bdo><ul id='cQZSX'></ul>
                    <legend id='cQZSX'><style id='cQZSX'><dir id='cQZSX'><q id='cQZSX'></q></dir></style></legend>

                      <small id='cQZSX'></small><noframes id='cQZSX'>

                    1. <i id='cQZSX'><tr id='cQZSX'><dt id='cQZSX'><q id='cQZSX'><span id='cQZSX'><b id='cQZSX'><form id='cQZSX'><ins id='cQZSX'></ins><ul id='cQZSX'></ul><sub id='cQZSX'></sub></form><legend id='cQZSX'></legend><bdo id='cQZSX'><pre id='cQZSX'><center id='cQZSX'></center></pre></bdo></b><th id='cQZSX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='cQZSX'><tfoot id='cQZSX'></tfoot><dl id='cQZSX'><fieldset id='cQZSX'></fieldset></dl></div>

                    2. <tfoot id='cQZSX'></tfoot>

                          <tbody id='cQZSX'></tbody>
                          主站蜘蛛池模板: 一区二区三区韩国 | 国产精品一级在线观看 | 久久久精品影院 | 欧美精品成人 | 看片91| 免费一区二区 | 瑟瑟激情 | 日韩精品一区二区三区中文在线 | 羞羞视频免费在线 | 99精品欧美| 国产精品久久久久久久久婷婷 | 三级av在线| 色偷偷噜噜噜亚洲男人 | 免费av一区二区三区 | 色网站在线免费观看 | 久久夜视频 | 国产成人网 | 在线免费国产视频 | 毛片视频免费 | 一区二区三区四区免费观看 | 婷婷综合五月天 | 亚洲一二三视频 | 狠狠色综合欧美激情 | 午夜国产一级 | 亚洲综合在线网 | 久久涩涩| 欧美中文字幕在线 | 国产精品污www在线观看 | 日韩激情一区 | 四虎影院在线播放 | 日日躁狠狠躁aaaaxxxx | 黄色在线网站 | 国产一区二区精品在线 | 日本天天操 | 久久久久无码国产精品一区 | 精品国产不卡一区二区三区 | 精品久久香蕉国产线看观看亚洲 | 精品一区二区三区不卡 | 久久国产一区二区三区 | 九九亚洲精品 | 亚洲精品丝袜日韩 |