#12976 closed bug (fixed)
StyledEdit Cannot Open Some text files
Reported by: | vidrep | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/StyledEdit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Attachments (4)
Change History (21)
by , 8 years ago
Attachment: | BeOS Games.txt added |
---|
by , 8 years ago
Attachment: | HD5450.txt added |
---|
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
comment:2 by , 8 years ago
comment:3 by , 8 years ago
Both files open fine here.
Please check the output of catattr be:encoding /boot/home/Desktop/HD5450.txt
and listattr.
comment:4 by , 8 years ago
New text files created with hrev50559 also cannot be opened, with same error message. I'll provide your requested info shortly.
comment:5 by , 8 years ago
Welcome to the Haiku shell.
~> catattr be:encoding /boot/home/HD6450.txt /boot/home/HD6450.txt : int32 : 65535 ~> listattr be:encoding /boot/home/HD6450.txt listattr: initialization failed for "be:encoding": No such file or directory ~>
by , 8 years ago
Attachment: | screenshot2.png added |
---|
comment:7 by , 8 years ago
listattr is run with just the file name, no attribute name.
Anyway, the be:encoding should be a string if created by StyledEdit. So I need to know the exact process you used to create these files, to understand how they end up with an integer be:encoding (that is an old way to do it, from BeOS days). Moreover, the value stored in the attribute is the special value for "unknown" encoding. I should probably make StyledEdit ignore this specific value and re-do the detection from the text contents.
comment:8 by , 8 years ago
Welcome to the Haiku shell. ~> listattr /boot/home/HD6450.txt File: /boot/home/HD6450.txt Type Size Name ---------------------------------------------------------- Int-32 4 "be:encoding" MIME String 11 "BEOS:TYPE" Int-32 4 "wrap" Int-32 4 "alignment" Raw Data 160 "styles" 'RECT' 16 "StyledEdit-info" Int-32 4 "be:caret_position" 'info' 529 "pe-info" 732 bytes total in attributes. ~>
comment:10 by , 8 years ago
I did a comparision of texts that fail to open vs ones that don't. The commonality in the failed texts is the text encoding - Unicode (UTF8).
comment:11 by , 8 years ago
Please try again with hrev50562 or later. Fixed some issues here but I'm not sure I caught all cases.
comment:12 by , 8 years ago
I tried a bunch of text files with different encoding and all seem to work now. If a non-working example pops up we can reopen the ticket. Thanks!
comment:13 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
comment:15 by , 8 years ago
Still some issues here: I created a document with GoBe Word Processing and saved it in text format. When opened with StyledEdit the document is blank I can open it with Pe and see the contents without issue I have attached the document in question.
by , 8 years ago
Attachment: | Haiku Donations.txt added |
---|
comment:16 by , 8 years ago
In order to get a list of attributes I shortened the name to Donations.txt
Welcome to the Haiku shell.
~> listattr Donations.txt File: Donations.txt
Type Size Name
MIME String 11 "BEOS:TYPE"
Int-32 4 "alignment"
Raw Data 160 "styles"
Text 5 "be:encoding"
'RECT' 16 "StyledEdit-info" Int-32 4 "be:caret_position" 'info' 529 "pe-info"
729 bytes total in attributes. ~> catattr be:encoding /boot/home/Donations.txt /boot/home/Donations.txt : string : UTF-8 ~>
comment:17 by , 8 years ago
JFYI, with listattr -l
you'll also get the contents of the attributes. Saves you the cumbersome catattr line. :)
hrev50555
"error loading "xxxx.txt": Unsupported format"