ruby 读取txt后 txt中的中文乱码
小伙看你根骨奇佳,潜力无限,来学PHP伐。
This situation usually occurs when the encoding of the text file is inconsistent with the system encoding. You need to first figure out what the encoding of the text file is, and then
File.read('your_file.txt', 'r:YOUR_ENCODING')
Is it an encoding problem? Preferably encoded in UTF-8
This situation usually occurs when the encoding of the text file is inconsistent with the system encoding. You need to first figure out what the encoding of the text file is, and then
Is it an encoding problem? Preferably encoded in UTF-8