Author Topic: encodings  (Read 2357 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
encodings
« on: August 02, 2016, 10:04:30 PM »

File->Open (The Windows file-open dialog)
Doesn't support "Binary" encode.
Reload with Encoding does - supports Binary and Binary SBCS/DBCS


SaveAs: If the file you have loaded in Binary then Encoding has a long list of options, include both binary options.
SaveAs: If the file is Text SBCS/DBCS then Encoding has only about 12 options.


Whats up with this?








Saveas: From Binary to Unicode doesn't seem to change the buffer type. Still shows as binary.
The saved file seems to be unicode though.


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6867
  • Hero Points: 528
Re: encodings
« Reply #1 on: August 03, 2016, 12:21:06 AM »
File>Open definitely needs to display both binary options. We will fix this.

SaveAs for a file loaded as binary looks like it's working correctly. When you choose "Binary" (not Binary SBCS/DBCS), it's very similar to opening a file as Utf-8. It should show very similar options.

SaveAs from Binary to Unicode: Seems like this should turn off the binary property. We will look into this.

Not all conversions are supported. That's why there are different lists. For example, there's no support to convert SBCS/DBCS to other code pages (except for EBCDIC which is a special case).

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6867
  • Hero Points: 528
Re: encodings
« Reply #2 on: August 03, 2016, 10:25:23 AM »
Beta 3 will display binary encodings in open dialog.

beta 3 will also support switching out of a binary encoding and converting to another encoding. Previous implementation should not have made it look like you could switch encodings.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: encodings
« Reply #3 on: August 03, 2016, 06:42:08 PM »
Great!

So in File->New Encoding:
Q1: What is "DEFAULT" ? (Same question for LineFormat).

It has both Binary and Binary SBCS/DBCS.
Q2: If I select Binary, it is changed to Binary SBCS/DBCS.


Q3: Is there a way to change the encoding of an Untitled buffer?

Bug: Create a UTF-16 buffer.
Type some text.
Select View->Hex:
---------------------------
SlickEdit Pro
---------------------------
Switching into hex mode for this encoding requires reloading the file in Binary.

Save changes to ''?
---------------------------
Cancel   &Yes   &No   
---------------------------




Trying to close the buffer gives the correct result:
---------------------------
SlickEdit Pro
---------------------------
Save changes to 'Untitled<152>'?
---------------------------
Cancel   &Yes   &No   
---------------------------

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6867
  • Hero Points: 528
Re: encodings
« Reply #4 on: August 03, 2016, 06:50:00 PM »
You mean "Automatic". It depends on a ton of options. Line format can be in your settings too.

SlickEdit's default depends on the OS for line endings but users can change defaults.

Q2: I didn't mention that this is fixed in beta 3. I saw that.

Q3: Not yet.

Looks like switching to hex mode doesn't handle untitled buffers quite right.