iconv

centOs编译安装php7.2支持微擎php扩展

落花浮王杯 提交于 2020-02-15 13:29:48
发现yum安装许多坑 于是只好编译安装 第一步得到镜像地址 在 https://www.php.net/downloads.php 有的地址比较慢,需要耐心等待 cd /usr/local/srcwget https://www.php.net/distributions/php-7.2.19.tar.gztar xzvf php-7.2.19.tar.gzcd php-7.2.19 接下来是编译安装 配置命令 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --with-libxml-dir=/usr --with-xmlrpc --enable-zip --enable-fpm --enable-xml --enable-sockets --with

Convert UTF-16LE to UTF-8 in php

陌路散爱 提交于 2020-01-28 01:50:06
问题 I use iconv php function but some characters doesn't convert correctly: ... $s = iconv('UTF-16', 'UTF-8', $s); ... $s = iconv('UTF-16//IGNORE', 'UTF-8', $s); ... $s = iconv('UTF-16LE', 'UTF-8', $s); ... $s = iconv('UTF-16LE//IGNORE', 'UTF-8', $s); ... I also try mb_convert_encoding function but can't solve my problem. A sample text file: 9px.ir/utf8-16LE.rar 回答1: iconv supports the UTF-16LE encoding. You can use it to transpose the encoding from UTF-16LE to UTF-8 : $result = iconv($in_charset

Steps to enable and use iconv on Windows with Indy 10.5.9

廉价感情. 提交于 2020-01-23 03:35:32
问题 For cross-platform development with Internet Direct (Indy), it can be useful to enable iconv support instead of the OS-specific Windows character conversions. This would allow to continue developing and testing code on Windows in the Delphi IDE, but still be able to find conversion related issues before compiling the code on a different platform. Indy 10 already includes code to use the iconv API on Linux and Windows. On Windows, some preparation is required: copy the iconv API DLL to the app

_libiconv or _iconv undefined symbol on Mac OSX

假如想象 提交于 2020-01-21 03:29:20
问题 When compiling some packages from source on Mac OSX, I get the following iconv error: Undefined symbols for architecture x86_64: "_iconv", referenced from: "_iconv_close", referenced from: "_iconv_open", referenced from: or I get: Undefined symbols for architecture x86_64: "_libiconv", referenced from: "_libiconv_open", referenced from: "_libiconv_close", referenced from: Why does this happen and how can I get around this dependency or, more generally, figure out what is going on and how to

_libiconv or _iconv undefined symbol on Mac OSX

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-21 03:29:05
问题 When compiling some packages from source on Mac OSX, I get the following iconv error: Undefined symbols for architecture x86_64: "_iconv", referenced from: "_iconv_close", referenced from: "_iconv_open", referenced from: or I get: Undefined symbols for architecture x86_64: "_libiconv", referenced from: "_libiconv_open", referenced from: "_libiconv_close", referenced from: Why does this happen and how can I get around this dependency or, more generally, figure out what is going on and how to

Building the latest iconv and libxml2 binaries in Win32

一笑奈何 提交于 2020-01-12 18:54:01
问题 I'm trying to get MinGW and MSYS working so I can build iconv and libxml2 in Windows, but I'm finding ./configure and make are giving lots of BSD/Unix related errors that aren't specific enough to google, and not descriptive enough for me to figure out. Can anybody go through some of the steps needed to get iconv and libxml2 .dll/.lib built on a Win32 machine? I'm updating the libraries for some software and I fiddled around with this all day today and haven't figured it out. I got the newest

Building the latest iconv and libxml2 binaries in Win32

风格不统一 提交于 2020-01-12 18:51:48
问题 I'm trying to get MinGW and MSYS working so I can build iconv and libxml2 in Windows, but I'm finding ./configure and make are giving lots of BSD/Unix related errors that aren't specific enough to google, and not descriptive enough for me to figure out. Can anybody go through some of the steps needed to get iconv and libxml2 .dll/.lib built on a Win32 machine? I'm updating the libraries for some software and I fiddled around with this all day today and haven't figured it out. I got the newest

Building the latest iconv and libxml2 binaries in Win32

走远了吗. 提交于 2020-01-12 18:51:00
问题 I'm trying to get MinGW and MSYS working so I can build iconv and libxml2 in Windows, but I'm finding ./configure and make are giving lots of BSD/Unix related errors that aren't specific enough to google, and not descriptive enough for me to figure out. Can anybody go through some of the steps needed to get iconv and libxml2 .dll/.lib built on a Win32 machine? I'm updating the libraries for some software and I fiddled around with this all day today and haven't figured it out. I got the newest

linux下编码转换

做~自己de王妃 提交于 2020-01-12 16:44:17
1.什么是编码? 关于编码的定义,我们可以查看百度全科 http://baike.baidu.com/view/237708.htm 还可以参考:http://www.cnblogs.com/cocowool/archive/2009/04/25/1443529.html 2.linux下经常遇到的编码问题 如果你需要在Linux中操作windows下的文件,那么你可能会经常遇到文件编码转换的问题。Windows中默认的文 件格式是 GBK(gb2312) ,而Linux一般都是 UTF-8 。 3.查看编码的方法 方法一:file filename 方法二:在Vim中可以直接查看文件编码    :set fileencoding 即可显示文件编码格式。 如果你只是想查看其它编码格式的文件或者想解决用Vim查看文件乱码的问题,那么你可以在   ~/.vimrc 文件中添加以下内容:   set encoding=utf-8 fileencodings=ucs-bom,utf-8,cp936   这样,就可以让vim 自动识别文件编码 (可以自动识别UTF-8或者GBK编码的文件),其实就是依照 fileencodings提供的编码列表尝试,如果没有找到合适的编码,就用 latin-1 ( ASCII )编码打开。 4.文件编码转换 多平台方法: iconv

Encoding conversion of a fetch response

僤鯓⒐⒋嵵緔 提交于 2020-01-11 05:58:08
问题 Inside a React Native method I'm fetching a xml encoded in ISO-8859-1. As long as the fetching is completed I'm trying to convert it to UTF-8. Here the code: const iconv = require('iconv-lite'); fetch('http://www.band.uol.com.br/rss/colunista_64.xml', { headers: { "Content-type": "text/xml; charset=ISO-8859-1" } }) .then(res=>res.text()}) .then(text => { const decodedText = iconv.decode(Buffer.from(text, 'latin1'), 'latin1') , output = iconv.encode(decodedText, 'utf8') console.log(output