Author Topic: encodings  (Read 970 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1844
  • Hero Points: 179
  • 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: 4924
  • Hero Points: 402
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: 4924
  • Hero Points: 402
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: 1844
  • Hero Points: 179
  • 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: 4924
  • Hero Points: 402
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.