Code Monkey home page Code Monkey logo

convert-to-utf8's Introduction

ConvertToUTF8

ConvertToUTF8 package for editing and saving files encoded in Shift_JIS, EUC-JP, CP932, GBK, BIG5, BIG5-HKSCS, EUC-KR etc.

A screenshot of your spankin' package

A screenshot of your spankin' package

convert-to-utf8's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

convert-to-utf8's Issues

Uncaught The "path" argument must be one of type string, Buffer, or URL. Received type undefined

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.43.0 x64
Electron: 4.2.7
OS: Mac OS X 10.14.6
Thrown From: convert-to-utf8 package 0.2.4

Stack Trace

Uncaught The "path" argument must be one of type string, Buffer, or URL. Received type undefined

At internal/fs/utils.js:453

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
    at Object.openSync (fs.js:428:3)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:160:31)
    at Object.readFileSync (fs.js:341:35)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:580:40)
    at Object.open (/packages/convert-to-utf8/lib/convert-to-utf8.coffee:26:17)
    at /packages/convert-to-utf8/lib/convert-to-utf8.coffee:14:75)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349290)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:347765)
    at AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:723427)
    at EventEmitter.t (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:731350)
    at EventEmitter.emit (events.js:182:13)

Commands

     -3:11.3.0 core:undo (input.hidden-input)
     -3:10.5.0 core:copy (input.hidden-input)
     -2:52.7.0 core:select-all (input.hidden-input)
     -2:52.1.0 core:paste (input.hidden-input)
  3x -2:45.6.0 find-and-replace:show (input.hidden-input)
     -2:29.1.0 core:select-all (input.hidden-input)
     -2:28.3.0 core:copy (input.hidden-input)
     -2:15.7.0 core:paste (input.hidden-input)
  2x -2:11.9.0 core:backspace (input.hidden-input)
     -2:07.6.0 core:select-all (input.hidden-input)
     -2:06.9.0 core:copy (input.hidden-input)
 43x -1:51.9.0 core:backspace (input.hidden-input)
     -1:22.8.0 core:undo (input.hidden-input)
 19x -1:20.2.0 core:backspace (input.hidden-input)
     -1:01.7.0 core:copy (input.hidden-input)
     -0:02.5.0 convert-to-utf8:utf-8 (input.hidden-input)

Non-Core Packages

convert-file-encoding 0.1.0 
convert-to-utf8 0.2.4 

Failed to activate the convert-to-utf8 package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.3
System: Unknown Windows Version
Thrown From: convert-to-utf8 package, v0.2.4

Stack Trace

Failed to activate the convert-to-utf8 package

At Cannot find module 'iconv-lite'

Error: Cannot find module 'iconv-lite'
    at Module._resolveFilename (module.js:338:15)
    at Function.Module._resolveFilename (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\module-cache.js:383:52)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\native-compile-cache.js:50:27)
    at Object.<anonymous> (file:///C:/Users/qsy20/.atom/packages/convert-to-utf8-master/lib/convert-to-utf8.coffee:2:9)
    at Object.<anonymous> (file:///C:/Users/qsy20/.atom/packages/convert-to-utf8-master/lib/convert-to-utf8.coffee:1:1)
    at Module._compile (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\package.js:715:27)
    at Package.module.exports.Package.activateNow (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\package.js:173:16)
    at C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\package.js:795:25
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:241:20)
    at CommandRegistry.handleCommandEvent (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\atom-environment.js:1100:28)
    at EventEmitter.outerCallback (C:\Users\qsy20\AppData\Local\atom\app-1.7.3\resources\app.asar\src\application-delegate.js:314:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

Commands

     -0:03.3.0 convert-to-utf8:gbk (atom-text-editor.editor.is-focused)

Config

{}

Installed Packages

# User
No installed packages

# Dev
No dev packages

Uncaught RangeError: Maximum call stack size exceeded

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.16.0 x64
Electron: 1.3.13
OS: Unknown Windows version
Thrown From: convert-to-utf8 package 0.2.4

Stack Trace

Uncaught RangeError: Maximum call stack size exceeded

At C:\Users\Soulo\AppData\Local\atom\app-1.15.0\resources\app.asar\node_modules\underscore-plus\lib\underscore-plus.js:357

RangeError: Maximum call stack size exceeded
    at Object.spliceWithArray (/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:357:37)
    at TokenizedBuffer.module.exports.TokenizedBuffer.bufferDidChange (/app.asar/src/tokenized-buffer.js:278:18)
    at /app.asar/node_modules/text-buffer/lib/text-buffer.js:671:36
    at Set.forEach (native)
    at TextBuffer.module.exports.TextBuffer.emitDidChangeEvent (/app.asar/node_modules/text-buffer/lib/text-buffer.js:670:33)
    at TextBuffer.module.exports.TextBuffer.applyChange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:664:12)
    at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/app.asar/node_modules/text-buffer/lib/text-buffer.js:877:16)
    at TextBuffer.module.exports.TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:831:14)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:536:21)
    at TextBuffer.module.exports.TextBuffer.setText (/app.asar/node_modules/text-buffer/lib/text-buffer.js:476:19)
    at TextEditor.module.exports.TextEditor.setText (/app.asar/src/text-editor.js:1097:26)
    at Object.open (/packages/convert-to-utf8/lib/convert-to-utf8.coffee:28:12)
    at /packages/convert-to-utf8/lib/convert-to-utf8.coffee:14:75)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/app.asar/src/atom-environment.js:1179:28)
    at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:312:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -0:16.8.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:07.1.0 convert-to-utf8:utf-8 (input.hidden-input)

Non-Core Packages

atom-beautify 0.29.17 
browser-plus 0.0.87 
convert-to-utf8 0.2.4 
file-icons 2.1.2 
language-batch 0.4.0 
minimap 4.27.0 
simplified-chinese-menu 3.5.0 
tortoise-svn 0.5.0 

Uncaught TypeError: Cannot read property 'getPath' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.0
System: Ubuntu 14.04.2
Thrown From: convert-to-utf8 package, v0.2.4

Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

At /home/ioan/.atom/packages/convert-to-utf8/lib/convert-to-utf8.coffee:25

TypeError: Cannot read property 'getPath' of undefined
  at Object.module.exports.open (/home/ioan/.atom/packages/convert-to-utf8/lib/convert-to-utf8.coffee:25:18)
  at atom-workspace.<anonymous> (/home/ioan/.atom/packages/convert-to-utf8/lib/convert-to-utf8.coffee:14:75)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:241:29)
  at CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/opt/atom/resources/app.asar/src/command-registry.js:156:19)
  at EventEmitter.<anonymous> (/opt/atom/resources/app.asar/src/window-event-handler.js:70:30)
  at emitOne (events.js:77:13)
  at EventEmitter.emit (events.js:166:7)

Commands

  5x -7:23.2.0 core:backspace (atom-text-editor.editor.is-focused)
     -6:49.7.0 settings-view:open (atom-text-editor.editor.is-focused)
  2x -6:37.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:00.7.0 convert-to-utf8:utf-8 (div.settings-view.pane-item)

Config

{
  "core": {}
}

Installed Packages

# User
color-picker, v2.0.7
convert-to-utf8, v0.2.4

# Dev
No dev packages

Changes required due to TextBuffer.save becoming async in Atom 1.19

Hi! Thanks for maintaining the convert-to-utf8 package!

In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise that resolves when the save is complete. Because of this, a few other Atom APIs that use save have similarly become async:

  • Pane.close
  • TextBuffer.save
  • TextEditor.save
  • Pane.saveItem
  • Pane.saveItemAs
  • Pane.saveActiveItem
  • Pane.saveActiveItemAs
  • Pane.saveItems
  • Workspace.saveActivePaneItem
  • Workspace.saveActivePaneItemAs

Effects on this package

We think this package could be impacted by this upgrade because it calls the changed methods in the following places:

  • Workspace.saveActivePaneItem

We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.

What to do about the change

It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:

Please let me know if you have any questions. I would be happy to help!

Uncaught The value "2207938108" is invalid for option "size"

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.45.0 x64
Electron: 4.2.7
OS: Mac OS X 10.14.5
Thrown From: convert-to-utf8 package 0.2.4

Stack Trace

Uncaught The value "2207938108" is invalid for option "size"

At buffer.js:270

RangeError [ERR_INVALID_OPT_VALUE]: The value "2207938108" is invalid for option "size"
    at Function.alloc (buffer.js:279:3)
    at new Buffer (buffer.js:181:19)
    at /packages/convert-to-utf8/node_modules/iconv-lite/encodings/dbcs-codec.js:465:18)
    at Object.decode (/packages/convert-to-utf8/node_modules/iconv-lite/lib/index.js:36:23)
    at Object.open (/packages/convert-to-utf8/lib/convert-to-utf8.coffee:27:27)
    at /packages/convert-to-utf8/lib/convert-to-utf8.coffee:7:75)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349290)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:347765)
    at AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:725694)
    at EventEmitter.t (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:733617)
    at EventEmitter.emit (events.js:182:13)

Commands

     -9:48.6.0 convert-to-utf8:shift_jis (input.hidden-input)
     -8:58.9.0 core:save (input.hidden-input)
     -6:43 convert-to-utf8:shift_jis (input.hidden-input)
     -6:02.6.0 core:paste (input.hidden-input)
     -3:46.4.0 convert-to-utf8:shift_jis (input.hidden-input)
     -3:39 core:close (input.hidden-input)
  2x -2:02.3.0 convert-to-utf8:shift_jis (input.hidden-input)
     -1:37.8.0 convert-to-utf8:utf-8 (input.hidden-input)
     -1:31.8.0 core:save (input.hidden-input)
     -0:14.5.0 convert-to-utf8:shift_jis (input.hidden-input)

Non-Core Packages

convert-to-utf8 0.2.4 

Uncaught TypeError: The "path" argument must be one of type string, Buffer, or URL. Received type...

Prerequisites

Description

Steps to Reproduce

Expected behavior:

Actual behavior:

Versions

Atom: 1.60.0 x64
Electron: 9.4.4
OS: Mac OS X 10.15.7
Thrown From: convert-to-utf8 package 0.2.4

Stack Trace

Uncaught TypeError: The "path" argument must be one of type string, Buffer, or URL. Received type undefined

At internal/fs/utils.js:525

TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
    at Object.openSync (fs.js:432:10)
    at Object.func [as openSync] (electron/js2c/asar.js:140:31)
    at Object.readFileSync (fs.js:342:35)
    at Object.fs.readFileSync (electron/js2c/asar.js:542:40)
    at Object.open (/packages/convert-to-utf8/lib/convert-to-utf8.coffee:26:17)
    at /packages/convert-to-utf8/lib/convert-to-utf8.coffee:7:75)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:352694)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:351169)
    at AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:786918)
    at EventEmitter.t (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:794889)
    at EventEmitter.emit (events.js:223:5)
    at Object.onMessage (electron/js2c/renderer_init.js:115:818)

Commands

     -1:11.6.0 core:select-all (atom-pane.pane)
  2x -1:07.1.0 core:paste (atom-pane.pane)
     -0:59.2.0 application:new-file (atom-pane.pane)
     -0:58.3.0 intentions:highlight (input.hidden-input)
     -0:57.5.0 core:paste (input.hidden-input)
     -0:56.8.0 intentions:highlight (input.hidden-input)
     -0:56.2.0 core:select-all (input.hidden-input)
     -0:48.8.0 convert-to-utf8:shift_jis (input.hidden-input)
     -0:32 japan-util:hiragana (a.btn-issue.btn.btn-error)
     -0:29.1.0 japan-util:katakana-hankaku (a.btn-issue.btn.btn-error)
     -0:24.4.0 utf8-to-sjis (a.btn-issue.btn.btn-error)
  2x -0:18.1.0 auto-encoding:toggle (a.btn-issue.btn.btn-error)
     -0:03.3.0 convert-to-utf8:shift_jis (a.btn-issue.btn.btn-error)

Non-Core Packages

auto-encoding 0.7.2 
busy-signal 2.0.1 
convert-to-utf8 0.2.4 
intentions 2.1.1 
japan-util 0.3.0 
japanese-menu 1.15.0 
japanese-word-selection 0.5.1 
japanese-wrap 0.2.7 
japanese-zen-han-convert 0.5.0 
linter 3.4.0 
linter-stylelint 4.5.1 
linter-ui-default 3.4.1 
prettier-atom 0.60.1 
prettier-eslint 1.2.9 
prettier-standard-formatter 0.0.5 
sakura-text-converter 0.1.0 
utf8-to-sjis 0.1.0 

Additional Information

Uncaught TypeError: path must be a string or Buffer

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.24.1 x64
Electron: 1.6.16
OS: Mac OS X 10.12
Thrown From: convert-to-utf8 package 0.2.4

Stack Trace

Uncaught TypeError: path must be a string or Buffer

At fs.js:558

TypeError: path must be a string or Buffer
    at Object.fs.openSync (fs.js:558:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
    at Object.fs.readFileSync (fs.js:468:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:506:29)
    at Object.open (/packages/convert-to-utf8/lib/convert-to-utf8.coffee:26:17)
    at /packages/convert-to-utf8/lib/convert-to-utf8.coffee:14:75)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:388:36)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1286:25)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:333:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -0:27.1.0 core:paste (input.hidden-input)
     -0:26.6.0 core:confirm (input.hidden-input)
     -0:03.3.0 convert-to-utf8:utf-8 (input.hidden-input)

Non-Core Packages

auto-encoding 0.7.0 
convert-to-utf8 0.2.4 
Sublime-Style-Column-Selection 1.7.4 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.