[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55826] Wrong encoding of files generated by c

From: Charles Praplan
Subject: [Octave-bug-tracker] [bug #55826] Wrong encoding of files generated by code (fopen fprints fclose)
Date: Mon, 4 Mar 2019 12:39:44 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0


                 Summary: Wrong encoding of files generated by code (fopen
fprints fclose)
                 Project: GNU Octave
            Submitted by: charprap
            Submitted on: Mon 04 Mar 2019 05:39:42 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: Charles Praplan
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.1.0
        Operating System: Microsoft Windows



With Octave 5, the files generated by code (fopen fprints fclose) have their
encoding which depends on the editor settings:
    Menu: Edit -> Preferences -> Editor -> File Handling -> Text encoding...

This is reasonable.
On my system, I have selected SYSTEM for this encoding.

My system settings are as follows
   (obtained with following powershell command:

  IsSingleByte      : True
  BodyName          : iso-8859-1
  EncodingName      : Western European (Windows)
  HeaderName        : Windows-1252
  WebName           : Windows-1252
  WindowsCodePage   : 1252
  IsBrowserDisplay  : True
  IsBrowserSave     : True
  IsMailNewsDisplay : True
  IsMailNewsSave    : True
  EncoderFallback   : System.Text.InternalEncoderBestFitFallback
  DecoderFallback   : System.Text.InternalDecoderBestFitFallback
  IsReadOnly        : True
  CodePage          : 1252

However, when I execute the appended script, I get an UTF-8 file (10 bytes)
instead of an Windows-1252 file (8 bytes).

The situation is the same if I choose Windows-1252 in the settings.

This was different in Octave 4.4.1.


File Attachments:

Date: Mon 04 Mar 2019 05:39:43 PM UTC  Name: test.m  Size: 83B   By: charprap



Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]