This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./configure --host=i686-apple-darwin --disable-shared CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 CFLAGS="-arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -Wunused-value -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -fvisibility=hidden -gdwarf-2 -mthumb -miphoneos-version-min=5.0" CPP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/llvm-gcc-4.2/bin/llvm-cpp-4.2 AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar | |
make clean | |
make | |
cp lib/.libs/libidn.a libidn-i386.a | |
./configure --host=arm-apple-darwin --disable-shared CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 CFLAGS="-arch armv7 -fmessage-length=0 -pipe -std=c99 -Wno-trigra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ file ISO-8859-1.txt | |
ISO-8859-1.txt: ISO-8859 text | |
$ node iconvtest.js | |
DEBUG: Raw data from ISO file: Este es un texto en español donde tenemos acentos en la á y en otras vocales como la é,í,ó,ú. También hay otros símbolos pero con esto vale. | |
DEBUG: New input 10485760 bytes buffer created | |
DEBUG: 141 bytes written to iBuf in binary | |
DEBUG: siBuf size: 141 | |
DEBUG: siBuf contents: Este es un texto en español donde tenemos acentos en la á y en otras vocales como la é,í,ó,ú. También hay otros símbolos pero con esto vale. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var host='www.educacion.es'; | |
var uri='/404.html'; | |
var sys = require('sys'); | |
var http = require('http'); | |
var Iconv = require('iconv').Iconv; | |
var Buffer = require('buffer').Buffer; | |
var httpcli = http.createClient(80, host); | |
var request = httpcli.request( 'GET', uri, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request.on('response', function (response) { | |
//var responseBody = ''; | |
var resBuf = new Buffer(10485760); | |
var resIdx = 0; | |
sys.debug('STATUS= ' + response.statusCode); | |
sys.debug('HEADERS= ' + JSON.stringify(response.headers)); | |
//response.setEncoding('utf8'); | |
response.setEncoding('binary'); | |
response.on('data', function(chunk){ |