Giter VIP home page Giter VIP logo

Comments (7)

holzschu avatar holzschu commented on August 17, 2024

I don't know if that answers your question, but I've compiled nnn to WebAssembly. It will be in the next version of a-Shell (within a few days in TestFlight version, with a few weeks on the AppStore). I'll let you know when it's available. Also in the next version of a-Shell: ncurses (compiled to WebAssembly), which will greatly help in porting other programs.

from a-shell.

woncheol-kim avatar woncheol-kim commented on August 17, 2024

Amazing! Thanks!

from a-shell.

holzschu avatar holzschu commented on August 17, 2024

The TestFlight version of a-Shell mini with nnn included is here: https://testflight.apple.com/join/REdHww5C
I couldn't make it "edit" files (e) or display file details (f), but you can view the file (right arrow or l) and opent it in another app (o).

from a-shell.

woncheol-kim avatar woncheol-kim commented on August 17, 2024

thank you. this is a really promising progress!

I have found three bugs of nnn so far:

  • it does not display files with Korean file names ( or probably any other double byte characters )
  • file copy or move does not work
  • When making a new file, Canceling from prompt by escape key does not work

from a-shell.

holzschu avatar holzschu commented on August 17, 2024

Hi, thank you for raising all these points. There's a new a-Shell version out on TestFlight. It displays file names with UTF-8 characters, it has better copy and move (that one was tricky: the previous version was launching "cp", but asking for confirmation in an invisible screen. The new one asks for confirmation using hacks). I'm not sure about the issue with the escape key.

from a-shell.

woncheol-kim avatar woncheol-kim commented on August 17, 2024

Thanks. I’ve just tested it and observed the following issues:

  • File copy or move operations still fail and result in an error message saying “failed.”
  • It displays files with Korean file names, but there are some bugs depending on the OS:
    • On macOS Sonoma 14.5 with an M1 chip, it works fine.
    • On iOS 17.5.1, some file names are not displayed correctly, but the open function works fine.
    • On visionOS, some file names are not displayed correctly and the open function does not work.

I haven’t had enough time to test with various file names yet, but it seems characters including ‘ㅇ’ may be causing problems.

An example of a file name:
통장 사본 (계좌 확인서).pdf (: original file name)
(계좌 확).pdf (:file name displayed on nnn for a-Shell mini)

On second thought, the ‘jongseong’ of Korean characters might actually be causing this issue. Please refer to the following quotes from Wikipedia:

https://en.wikipedia.org/wiki/Hangul

Morpho-syllabic blocks

Except for a few grammatical morphemes prior to the twentieth century, no letter stands alone to represent elements of the Korean language. Instead, letters are grouped into syllabic or morphemic blocks of at least two and often three: a consonant or a doubled consonant called the initial (초성, 初聲 choseong syllable onset), a vowel or diphthong called the medial (중성, 中聲 jungseong syllable nucleus), and, optionally, a consonant or consonant cluster at the end of the syllable, called the final (종성, 終聲 jongseong syllable coda). When a syllable has no actual initial consonant, the null initial ㅇ ieung is used as a placeholder. (In the modern Korean alphabet, placeholders are not used for the final position.) Thus, a block contains a minimum of two letters, an initial and a medial. Although the Korean alphabet had historically been organized into syllables, in the modern orthography it is first organized into morphemes, and only secondarily into syllables within those morphemes, with the exception that single-consonant morphemes may not be written alone.

The sets of initial and final consonants are not the same. For instance, ㅇ ng only occurs in final position, while the doubled letters that can occur in final position are limited to ㅆ ss and ㄲ kk.

Not including obsolete letters, 11,172 blocks are possible in the Korean alphabet.[77]

from a-shell.

woncheol-kim avatar woncheol-kim commented on August 17, 2024

I believe I have found a clue to solving the issue with Korean file names. I copied some files from Apple Vision Pro to an Ubuntu Linux server using scp. When I connected to the Linux server via SSH from the macOS terminal and launched nnn, I noticed a similar problem. While I should have tried listing the file names using the ls command first, I instead attempted to convert the file names on the Linux server with the following command:

convmv -f utf8 -t utf-8-strict -r --nfc --replace --notest ./

After running this command, nnn displayed the file names correctly. This suggests two things:

  1. The convmv command is already installed in my a-Shell app (probably via the pip command), but it never actually worked properly.

  2. The Linux version of nnn does not seem to support NFD-type Unicode normalization, and your a-Shell version of nnn also lacks support for NFD.

Please note that Apple devices use NFD as the standard Unicode normalization, whereas Microsoft does not support NFD.

For more information, please refer to the following link:
https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms

from a-shell.

Related Issues (20)

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.