跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 求助 http 编码 utf8,写入文件指定 utf8,生成 utf16le 文件
未分類
25 9 月 2020

求助 http 编码 utf8,写入文件指定 utf8,生成 utf16le 文件

求助 http 编码 utf8,写入文件指定 utf8,生成 utf16le 文件

資深大佬 : TomVista 0

返回 header

Headers {    [Object: null prototype] {      'content-encoding': [ 'gzip' ],      'content-type': [ 'application/json; charset=utf-8' ],      date: [ 'Tue, 22 Sep 2020 03:53:46 GMT' ],      server: [ 'Caddy' ],      'x-request-id': [ '' ],      connection: [ 'close' ],      'transfer-encoding': [ 'chunked' ] } } 

部分返回内容

""" 鍦板潃鏀惰棌   columns and relationships of "address"  """ type address {   """鍦板潃琛屾斂鍒掑垎"""   address_components(     """JSON select path"""     path: String   ): jsonb    """璇︾粏鍦板潃"""   formatted_address: String    """缁忕含搴?""   geometry: geography   id: uuid! 

文件写入

fs.writeFileSync(output, 'uFEFF' + schema, {       encoding: 'utf8',     }) 

最后文件是 utf16-le,转成 utf-8 会乱码?

不清楚哪里出问题了

大佬有話說 (0)

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具