netbeans-markdown icon indicating copy to clipboard operation
netbeans-markdown copied to clipboard

Russian letters are displayed incorrectly in a file with UTF-8 encoding

Open proffix4 opened this issue 1 year ago • 9 comments

Снимок экрана 2024-02-20 101316

proffix4 avatar Feb 20 '24 04:02 proffix4

README.md

proffix4 avatar Feb 20 '24 04:02 proffix4

TSN_Java_Lab1_2_2024

Создание простейшей визуальной программы на JAVA

screenshot

proffix4 avatar Feb 20 '24 04:02 proffix4

Hi, thanks for notification, i will try to fix.

moacirrf avatar Feb 20 '24 12:02 moacirrf

Its working on Linux( Fedora Kinoite), i will try on a windows VM soon, can you inform me:

  • Netbeans version
  • Operational System

thanks

moacirrf avatar Feb 20 '24 12:02 moacirrf

Apache NetBeans 20, Windows 11, JDK17

proffix4 avatar Feb 20 '24 13:02 proffix4

Hi Strange, unfortunately i can't replicate this error. I tried Netbeans 20,21 with oracle JDK 17, 18 and Open JDK, Windows 11 I will keep this issue open.

moacirrf avatar Mar 05 '24 17:03 moacirrf

У меня русский Windows 11 с кодировкой windows-1251 по умолчанию системыОтправлено с устройства Galaxy -------- Исходное сообщение --------От: Moacir da Roza Flores @.> Дата: 05.03.2024 22:42 (GMT+05:00) Кому: moacirrf/netbeans-markdown @.> Копия: "Talipov S.N." @.>, Author @.> Тема: Re: [moacirrf/netbeans-markdown] Russian letters are displayed incorrectly in a file with UTF-8 encoding (Issue #67) Hi Strange, unfortunately i can't replicate this error. I tried Netbeans 20,21 with oracle JDK 17, 18 and Open JDK. I will keep this issue open.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

proffix4 avatar Mar 05 '24 17:03 proffix4

Hi, I believe this is usually caused when binary to text conversion happens while encoding is not specified - in such case default encoding used by system is used which might behave differently for each user.

I believe NetBeans detects encoding of file and also has support for setting project specific encoding, so probably best approach would be to read charset from project somehow :-/ Or at least specify some charset. I could try to find out more if you want...

Calls with unspecified charset I spotted:

  • fileObject.asText in MarkdownPreviewPane.FillEditorPaneWorker.doInBackground
  • outputStream.toString() in JEditorPaneImpl.getVisibleText

hajdam avatar Oct 19 '24 10:10 hajdam

Thanks, I appreciate the tips.

Feel free to play around with the code if you want. I've been pretty busy these past few weeks, so I won't have time to investigate these issues right now.

Hi, I believe this is usually caused when binary to text conversion happens while encoding is not specified - in such case default encoding used by system is used which might behave differently for each user.

I believe NetBeans detects encoding of file and also has support for setting project specific encoding, so probably best approach would be to read charset from project somehow :-/ Or at least specify some charset. I could try to find out more if you want...

Calls with unspecified charset I spotted:

* fileObject.asText in MarkdownPreviewPane.FillEditorPaneWorker.doInBackground

* outputStream.toString() in JEditorPaneImpl.getVisibleText

moacirrf avatar Oct 22 '24 22:10 moacirrf