Giter Club home page Giter Club logo

Comments (11)

udaken avatar udaken commented on May 19, 2024 1

Sample data attached.
I hope this will be useful to you.

furigana.xlsx

from nanoxlsx.

udaken avatar udaken commented on May 19, 2024 1

Thanks for fixing it.
The new version works correctly.
If I find any problems, I will report them.

from nanoxlsx.

udaken avatar udaken commented on May 19, 2024

My guess is that we can just ignore the rPH tag.

from nanoxlsx.

rabanti-github avatar rabanti-github commented on May 19, 2024

こんいちは

Thank you for the report.

So, have I understood the issue correct:
The Furigana part above the Kana should never be visible in Excel. But it should be preserved when you copy the value of a cell to a program that handle Furigana?
I am asking because, when we ignore, rPh, the Furigana signs will be lost.

I will have a look into the formatting in the shared string table. This (inline formatting) is on top of my backlog as ToDo.

Thank you in advance for clarification.

from nanoxlsx.

udaken avatar udaken commented on May 19, 2024

Yes, Excel does not display the furigana part.

I have been using files containing Japanese for over 10 years and have never needed furigana.
Even when I edit files in Excel for the web, the furigana is lost.

Therefore, my conclusion is that there is no problem with lost furigana.

For a program to preserve the furigana, you generally need a different object model than a single value.
VBA provides Characters.PhoneticCharacters.

from nanoxlsx.

rabanti-github avatar rabanti-github commented on May 19, 2024

OK, thank you.

When I implemented the shared string table, I decided to remove all paragraphs and to keep all enclosed text, to preserve any content. However, since Furigana is only a Kanji transcription, it's presence breaks the sentence / word structure ,as you already stated.

Let me look for the best solution to preserve formatted text and to remove transcriptions. I have analyze the rPH (and possible others) tag a little bit. Maybe it can always be ignored or there will be an import option, if there are use cases, where rPH content is meaningful.

Please give me some time to do this. Currently, I am working on a big refactoring (dev branch) and I have to adapt any change on several braches and projects.

どうもありがとうございました。

from nanoxlsx.

rabanti-github avatar rabanti-github commented on May 19, 2024

I have some good news.
The rPH tag seems to be designated only for transcriptions (as Furigana is) of Han-originated characters. So it can be removed from the original text without side-effects.
I will do this by default with an opt-in import-option to keep the transcriptions, enclosed in brackets, if wished.
Please give me some days to implement and test this feature.

from nanoxlsx.

rabanti-github avatar rabanti-github commented on May 19, 2024

Hello
Technically, I already have a solution.
However. I have insufficient test data. And it looks like my western Office refuses to carry Furigana at all. I tried to copy-paste from a web browser and Word, but Excel never created a rPH tag.

Could you provide me with some additional samples, where Kanji characters are transcribed by Furigana? I would suggest something like that:

  • お元気ですか --> Two connected Kanji surrounded by Hiragana
  • この所は賑やかです。--> Two disconnected Kanji, surrounded by Hiragana
  • --> One single Kanji
  • 富士山は高いです。--> Several Kanji at the beginning of the text and Hiragana at the end
  • この儘--> Hiragana with Kanji at the end of the text

If you could provide me an Excel file with these (or similar) use cases, I could test my patch properly. Currently, I cannot predict the right tag structure.

Thank you very much in advance.

from nanoxlsx.

udaken avatar udaken commented on May 19, 2024

Thank you for your quick response.

We will gladly provide sample data. Please wait a moment.

from nanoxlsx.

rabanti-github avatar rabanti-github commented on May 19, 2024

ただいま
Thank you for the samples. They helped me a lot.
I just released v1.8.6. The Nuget packet will be available in some minutes.
by default, Furigana will now be discarded. If the transcription is wished, there is an import option "EnforcePhoneticCharacterImport", that can be set to true. In this case, Furigana will be appended to the Kanji characters:

Default With Import Option
お元気ですか お元気(ゲンキ)ですか
この所は賑やかです この所(トコロ)は賑(ニギ)やかです
金(カネ)
富士山は高いです。 富士山(フジサン)は高(タカ)いです。
この儘 この儘(ママ)

Please let me know if something is not working as expected.
また、レポートありがとうございました。

from nanoxlsx.

rabanti-github avatar rabanti-github commented on May 19, 2024

I will close this issue for now. If you try out the fix and find something that is not as you would expecting, please do not hesitate to re-open or file a new issue.
Thank you

from nanoxlsx.

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.