Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texts of notes display incorrectly. #179

Closed
forest71 opened this issue Jul 9, 2018 · 13 comments
Closed

Texts of notes display incorrectly. #179

forest71 opened this issue Jul 9, 2018 · 13 comments

Comments

@forest71
Copy link

forest71 commented Jul 9, 2018

I imported enex file from evernote to quentier but all texts of imported notes looks like this: http://prntscr.com/k4fw49

I noticed it happens only with texts in russian language.

How to fix this problem?

@d1vanov
Copy link
Owner

d1vanov commented Jul 9, 2018

Thanks for reporting this! Could you please share the enex file with which the problem reproduces and also specify which version of Quentier you are using - platform (Linux, Windows or Mac), where it was installed from etc.

@forest71
Copy link
Author

forest71 commented Jul 9, 2018

Can't provide enex file right now, but you can reproduce this bug if you create a note in evernote with russian text, then export it to enex file and open it in Quentier .

Version of Quentier is 0.4.0 (Qt 5.10.1)
Platform: Windows
Setup file was downloaded from here: https://github.com/d1vanov/quentier
Qt 5.10 64 bit installer

@d1vanov
Copy link
Owner

d1vanov commented Jul 9, 2018

Thanks for the info, will try to look into this. I guess it is somehow connected with UTF-16 being the default encoding on Windows.

@forest71
Copy link
Author

forest71 commented Jul 9, 2018

Thanks, will wait for answer.

@d1vanov d1vanov self-assigned this Jul 10, 2018
d1vanov added a commit that referenced this issue Jul 10, 2018
@d1vanov
Copy link
Owner

d1vanov commented Jul 10, 2018

I haven't tried to reproduce this myself yet but I believe I see the reason of this issue from just looking through the code - it's a bug, I carelessly used platform-dependent string encoding instead of proper UTF-8 one. On Linux and Mac that encoding happens to actually be UTF-8 - the same encoding used by Evernote for ENEX files, so no issues should occur on those platforms. On Windows the default encoding is UTF-16, however, and thus any non-English text would be processed incorrectly when importing/exporting notes from/to ENEX.

The experimental fix is ready but I need to test it before applying it to the stable branch, so stay tuned.

@forest71
Copy link
Author

Ok, got it.

@d1vanov
Copy link
Owner

d1vanov commented Jul 10, 2018

The build containing the fix is available now and can be downloaded from here. @forest71, if you wish, you can try this build and see if it fixes your issue. Unfortunately, the already imported notes would not be fixed but the newly imported ones should be displayed properly. I still haven't tested it myself yet.

There are two downloads at the link:

  1. SetupQuentier<...>.exe is the installer like the one you downloaded originally, it would replace the version you have installed now.
  2. Quentier-windows<...>.zip is the zip archive containing Quentier executable, libraries and other needed stuff. You can unzip it anywhere and run without installing for testing purposes.

@forest71
Copy link
Author

forest71 commented Jul 10, 2018

It worked. Now all texts display correctly, thanks.

  1. Where Quentier keeps imported files?
    Just in case I deleted previous version and installed (unziped) Quentier from zip archive. When I opened this zip version all previous imported notes were still there.

  2. When you update Quentier can you also upload portable version (just like Quentier from that archive)? It is very handy.

d1vanov added a commit that referenced this issue Jul 11, 2018
…encoding-when-importing-enex

Issue #179: fix nondeterminate (platform-specific) encoding when expo…
@d1vanov
Copy link
Owner

d1vanov commented Jul 11, 2018

Great, thanks for verifying! Merged the fix to master and development branches, updated downloads will appear on releases page shortly.

  1. Quentier stores all notes, imported or synchronized or manually typed in a local storage database. All persistent storage of Quentier including the database is located in a separate folder, not near the executable. In case of Windows the folder where Quentier's persistent storage is located is C:\Users\%USERNAME%\AppData\Roaming\Quentier. So if you want to wipe all your storage out, you need to remove that folder. Alternatively, in your case you could delete the notes you imported previously: in case of local account permanent deletion is possible, in case of Evernote account you can't actually delete the note permanently via Quentier (Evernote disallows third party apps to do that) but you can mark it as deleted which would make it disappear from your notes list and appear within the deleted notes list. If that latter one is not displayed in the bottom of the left side panel of the app, toggle its display via "View" -> "Side panel" -> "Show deleted notes" menu entry. The notes marked as deleted can be restored from Quentier or Evernote and they can be deleted permanently but only via the official Evernote client or web version of Evernote.
  2. Yes, I guess it is possible to upload portable version to the releases page. I created Upload portable Quentier for Windows versions in zip archives to GitHub releases #181 to do it carefully.

@d1vanov d1vanov closed this as completed Jul 11, 2018
@forest71
Copy link
Author

Understood, thanks.
There is something else.

I found several files in account folder:
.sqlite
.sqlite-shm
.sqlite-wal
folder "NoteEditorPage"

  1. If I understand correctly, all notes (as well as imported) stored in .sqlite file, right?

  2. What is the purpose of "NoteEditorPage" folder?

  3. Is it possible to do so that all notes will be stored in one folder with Quentier itself?
    Situation for example: if you want to move portable version of Quentier to flash drive, you need to move only one folder (that include Quentier and it's databases) instead of two (folder with Quentier and folder with it's databases).

@d1vanov
Copy link
Owner

d1vanov commented Jul 11, 2018

  1. Yes, exactly. The two other sqlite files are just auxiliary ones managed by SQLite database itself.
  2. This folder contains some auxiliary files used by the note editor. It is merely an implementation detail in fact - the note editor is implemented as a web page and it needs a .html file to display the note + image files for stuff like note attachments + some other stuff.
  3. Yes, it is possible to change the storage folder, for that it's enough to run Quentier from command line with --storageDir <path> argument. On Windows you can put this argument into the properties of the label via which you start Quentier.

@d1vanov
Copy link
Owner

d1vanov commented Jul 11, 2018

The information about the storage folder is actually explained in the beginning of this article about Quentier features. Given your question I conclude you haven't read it yet, so I encourage you to do so 😃

@forest71
Copy link
Author

Thanks, will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants