Hi all,
I've a strange encoding issue.
By default TM uses UTF-8 LF endoding.
When a file contaings spectial charaters, and one edit this file in an other texteditor, TextEdit, save this file and open in TM again, the encoding becomes Chinese GB18030.
How to reproduce:
Create in TM a new file with content: "some text with some special characters: é ü à" Save this file UTF-8 and LF encoding. close file open file in TextEdit and add a new line with some text, save Reopen the file in TM => now encoding is Chinese GB18030
Does any body have a clue what is hapening? It is special character related!
macOS 10.13.4 TM 2.0 rc9
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
well I tried with your string and it didn't happen for me, and when I checked with file it was ok... I would guess there is a problem with default encoding in text mate
$ file ~/Desktop/test1.txt /Users/gplayer/Desktop/test1.txt: UTF-8 Unicode text, with no line terminators $ file ~/Desktop/test1.txt /Users/gplayer/Desktop/test1.txt: UTF-8 Unicode text
On Apr 3, 2018, at 1:22 PM, feek feekdiv@gmail.com wrote:
some text with some special characters: é ü à
I cant reproduce this either, on TM 2.0-rc.7
Is your default set to UTF-8 + LF, or is it something you are selecting manually when you save the file?
What file type is it showing as, when you open the file?
On 3 April 2018 at 21:17, Grady Player gradyplayer@gmail.com wrote:
well I tried with your string and it didn't happen for me, and when I checked with file it was ok... I would guess there is a problem with default encoding in text mate
$ file ~/Desktop/test1.txt /Users/gplayer/Desktop/test1.txt: UTF-8 Unicode text, with no line terminators $ file ~/Desktop/test1.txt /Users/gplayer/Desktop/test1.txt: UTF-8 Unicode text
On Apr 3, 2018, at 1:22 PM, feek feekdiv@gmail.com wrote:
some text with some special characters: é ü à
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Hi, thnx for the prompt replies!
My default is UTF-8 + LF, no manually changes.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
if the save from text edit is changing the format, check your preferences for text edit...
On Apr 3, 2018, at 2:54 PM, feek feekdiv@gmail.com wrote:
Hi, thnx for the prompt replies!
My default is UTF-8 + LF, no manually changes.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
It becomes even more strange....
Terminal says it is is UTF encoded but TM says it is Chinese
== Feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
@Grady,
The settings of TextEdit are ok. It also happens in nvALT, so not directly text editor related.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
I cannot reproduce it neither. However, you could try deleting the encoding database.
~/Library/Caches/com.macromates.TextMate/EncodingFrequencies.binary
On Apr 3, 2018, at 5:06 PM, feek feekdiv@gmail.com wrote:
@Grady,
The settings of TextEdit are ok. It also happens in nvALT, so not directly text editor related.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Thnx for the suggestion Ronald. But no effect.
Also tried it on a new user account.... same behavior.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
I've been able to reproduce this. At first I thought I couldn't, but I didn't realize that I needed to use the Save As dialog to see the encoding. When I did that as the last step, feek's original instructions worked.
OSX 10.13.3 TextMate version 2.0-rc.9
Unfortunately, that's all I've got on this one.
Graham
On Tue, Apr 3, 2018 at 4:28 PM feek feekdiv@gmail.com wrote:
Thnx for the suggestion Ronald. But no effect.
Also tried it on a new user account.... same behavior.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
OK. I was able to reproduce it as well. It’s a bug. The OS is returning utf-8 for the encoding, but TM is expecting UTF-8.
Are you on 10.13? I am not sure when this changed, the bug appears at least since macOS 10.9. I’ll see if I can submit a PR to fix this.
/Ron
On Apr 3, 2018, at 5:16 PM, Ronald Wampler rdwampler@gmail.com wrote:
I cannot reproduce it neither. However, you could try deleting the encoding database.
~/Library/Caches/com.macromates.TextMate/EncodingFrequencies.binary
On Apr 3, 2018, at 5:06 PM, feek feekdiv@gmail.com wrote:
@Grady,
The settings of TextEdit are ok. It also happens in nvALT, so not directly text editor related.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Good morning,
great Graham and Ronald,
Happy you can reproduce it as well.
Sorry I did not described the last step (use save as) clearly.
Yes I'am on MacOS 10.13.4 and TM 2.0 rc9.
Hope you can fix it!
== Feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
Hi Ronald,
I saw your solution is implemented for the next version of Texmate: https://github.com/textmate/textmate/commit/1b33f6e36daefc48d9ba86822738c71e...
Thnx!!
Does someone know when we can expect a new Test Build (2.0-rc.10 I guess)? Hope soon.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
Thnx Allan!
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html