[Bug 1837745] [NEW] Corrupted sketch file when Chinese content

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] [NEW] Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
Public bug reported:

I can input Chinese when naming an object,
but when I save the sketch, the *.fgeo xml file becomes garbage.
It's very easy to reproduce.
Just create a point, give it a Chinese name, and save it.
Saving seems ok, but from the host OS you can see that the file becomes garbage.

** Affects: drgeo
     Importance: Undecided
     Assignee: Chao-Kuei Hung (ckhung0)
         Status: New


** Tags: core

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I can input Chinese when naming an object,
  but when I save the sketch, the *.fgeo xml file becomes garbage.
  It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.
  Saving seems ok, but from the host OS you can see that the file becomes garbage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
Sketch with accentuated Latin characters has issue too....
Pharo 8 regression?


** Attachment added: "Accentuated latin characters"
   https://bugs.launchpad.net/drgeo/+bug/1837745/+attachment/5278988/+files/test.fgeo

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I can input Chinese when naming an object,
  but when I save the sketch, the *.fgeo xml file becomes garbage.
  It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.
  Saving seems ok, but from the host OS you can see that the file becomes garbage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
Indeed P8 regression. It works fine with DrGeo based on P7 (release
17.07)

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I can input Chinese when naming an object,
  but when I save the sketch, the *.fgeo xml file becomes garbage.
  It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.
  Saving seems ok, but from the host OS you can see that the file becomes garbage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
** Attachment added: "Pharo Debug log file"
   https://bugs.launchpad.net/drgeo/+bug/1837745/+attachment/5278990/+files/PharoDebug.log

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I can input Chinese when naming an object,
  but when I save the sketch, the *.fgeo xml file becomes garbage.
  It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.
  Saving seems ok, but from the host OS you can see that the file becomes garbage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
P7 regression not P8

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I can input Chinese when naming an object,
  but when I save the sketch, the *.fgeo xml file becomes garbage.
  It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.
  Saving seems ok, but from the host OS you can see that the file becomes garbage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

ckhung
In reply to this post by Hliaire Fernandes
** Description changed:

- I can input Chinese when naming an object,
- but when I save the sketch, the *.fgeo xml file becomes garbage.
- It's very easy to reproduce.
- Just create a point, give it a Chinese name, and save it.
- Saving seems ok, but from the host OS you can see that the file becomes garbage.
+ I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
+ object, I can input Chinese using the fcitx input method from the host.
+ When I save the sketch, however, the *.fgeo xml file becomes garbage, as
+ can be seen using an editor from the host OS. Then Dr. Geo will fail if
+ asked to load the sketch. It's very easy to reproduce. Just create a
+ point, give it a Chinese name, and save it.

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

ckhung
In reply to this post by Hliaire Fernandes
Here is a correct fgeo file that contains a point with an English name.

(I cannot attach multiple files in a single comment, can I?)


** Attachment added: "a point with English name"
   https://bugs.launchpad.net/drgeo/+bug/1837745/+attachment/5279150/+files/taiwan-en.fgeo

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

ckhung
In reply to this post by Hliaire Fernandes
Here is a (damaged) fgeo file that contains a point with a zh_TW name
"台灣".


** Attachment added: "taiwan-zh_TW.fgeo"
   https://bugs.launchpad.net/drgeo/+bug/1837745/+attachment/5279151/+files/taiwan-zh_TW.fgeo

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
The problem may come when saving and not loading.
But I can't input chinese (But pasting your Taiwan chinese word seem ok there). Better you can apply these changes below.

Apply this fix bellow to your running DrGeo instance:

Add and modify these three methods in the class DrGDirectoryLocal
(To open it, Shift-Enter, write its name, select it in the list and Enter)

putBinary: stream into: filename
        (location  asFileReference / filename) ensureDelete binaryWriteStreamDo: [ :fileStream |
                fileStream nextPutAll: stream contents]

putText: stream into: filename
        (location  asFileReference / filename) ensureDelete writeStreamDo: [ :fileStream |
                fileStream nextPutAll: stream contents]

put: stream into: filename
        stream isBinary
                ifTrue: [ self putBinary: stream into: filename]
                ifFalse: [ self putText: stream into: filename ]

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
If it is too much just drag and drop in DrGeo the attached st source of
the modified class

** Attachment added: "Updated class"
   https://bugs.launchpad.net/drgeo/+bug/1837745/+attachment/5279247/+files/DrGDirectoryLocal.st

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

ckhung
In reply to this post by Hliaire Fernandes
Yes, it works, thanks!

After opening the class editor, I click the put:into: method, replace
the original code, and press ctrl-s to save. Then I click "+Inst. side
meth" tab, paste another method, and press ctrl-s. Finally do the same
for the 3rd method. After that, sketch saving works correctly. I can
open the saved file in a text editor and see the Chinese name. Loading
also works.

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  New

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
** Changed in: drgeo
       Status: New => Fix Committed

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  Fix Committed

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
** Changed in: drgeo
    Milestone: 19.06 => 19.09

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  Fix Committed

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions

Reply | Threaded
Open this post in threaded view
|

[Bug 1837745] Re: Corrupted sketch file when Chinese content

Hliaire Fernandes
Administrator
In reply to this post by Hliaire Fernandes
** Changed in: drgeo
       Status: Fix Committed => Fix Released

--
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1837745

Title:
  Corrupted sketch file when Chinese content

Status in Dr. Geo II:
  Fix Released

Bug description:
  I am running Dr. Geo 19.06 on Lubuntu 18.04. When naming a Dr. Geo
  object, I can input Chinese using the fcitx input method from the
  host. When I save the sketch, however, the *.fgeo xml file becomes
  garbage, as can be seen using an editor from the host OS. Then Dr. Geo
  will fail if asked to load the sketch. It's very easy to reproduce.
  Just create a point, give it a Chinese name, and save it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1837745/+subscriptions