Issue 28241 - Greek characters as HTML entities
Summary: Greek characters as HTML entities
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: eric.savary
QA Contact: issues@sw
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2004-04-22 20:49 UTC by from-oo
Modified: 2013-08-07 14:41 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch to resolve the problem (544 bytes, application/x-gzip)
2004-04-22 20:50 UTC, from-oo
no flags Details
Patches for the file svtools/source/svhtml/htmlout.cxx (2.92 KB, application/x-compressed)
2005-01-15 09:37 UTC, from-oo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description from-oo 2004-04-22 20:49:31 UTC
The greek characters in export as HTML are saved as HTML entities, which is
wrong (according to w3c).
Comment 1 from-oo 2004-04-22 20:50:14 UTC
Created attachment 14702 [details]
patch to resolve the problem
Comment 2 utomo99 2004-04-23 06:02:34 UTC
can you point out the w3c url for reference for this issue please. 
Thanks

Comment 3 michael.ruess 2004-04-23 09:50:44 UTC
MRU->ES: pls evaluate...
Comment 4 eric.savary 2004-05-07 00:20:08 UTC
ES->MIB: can you handle this patch, please.
Comment 5 michael.brauer 2004-06-15 13:27:23 UTC
First of all, I assume you are refering to section "24.3 Character entity
references for symbols, mathematical symbols, and Greek letters" of the HTML
4.01 specification (http://www.w3.org/TR/html4/sgml/entities.html). I also agree
that using entities for greek characters is not reasonable if greek encodings
are used.

I had a look at your patch, and want to thank you for sending it to us. However,
it seems to me that the patched code is not very efficient, because it contains
many string comparisons. For this reason, I would suggest to 

1) Add a parameter to the function "lcl_svhtml_GetEntityForChar" that contains
the current encoding.
2) Divide the switch statement contained in the function
"lcl_svhtml_GetEntityForChar" into two, one that contains the non-greek
characters only, and one that contains the greek characters only. The 2nd switch
statement should be executed only for non-greek encodings.

Do you think it would be possible for you to send us an updated patch?



Comment 6 from-oo 2004-06-16 07:31:41 UTC
Hi,
first of all, I saw I sent by accident the wrong patch. The correct one is
exactly the same (codewise) but also has credits. It's based on the patch by
Pavel Janík  for ISO_8859_2 characters found at: http://puma.feld.cvut.cz/~pavel/

Second, you are right, it's inefficient, but the solution you suggest, would
mean changes to the lcl_svhtml_GetEntityForChar prototype. Wouldn't that suggest
bigger changes throughout the program?

Greek characters are consecutive. Could we do simple arithmetics on a switch .
i.e if greater than 0386 and less than 03CE (some blanks exist in there, but you
get the point), just do nothing (pStr=0). Do you think that would work?

Comment 7 stx123 2004-11-26 17:49:36 UTC
Hi, we are coming closer to 2.0 and we would like to clean up the issues with
target milestone 2.0.
'izone', are you going to work on this patch?
Michael (mib) will not see your comments. You may want to ask him at the
dev@sw.openoffice.org list.
Greetings, Stefan

Comment 8 from-oo 2004-11-29 08:57:57 UTC
Hi,
Well, I thought I'ld get an answer to the question I asked on June 15th first!!!
But I'll try to come up with something to see if it is ok.

Comment 9 from-oo 2005-01-15 09:35:48 UTC
Hi,
I attach a zip file, containing two patches. 
The one named htmlout.patch, applies to 1.1.4 source.
The one named htmlout-2.patch applies to CVS Head (updated 14/1/2005)

They were created by Alexios Zavras and tested by Dimitrios Korbetis and they
solve the problem with the Greek characters on HTML export.

Comment 10 from-oo 2005-01-15 09:37:18 UTC
Created attachment 21543 [details]
Patches for the file svtools/source/svhtml/htmlout.cxx
Comment 11 stx123 2005-02-15 17:58:06 UTC
Hi, let me reassign the issue to Michael (mib) for review of the new patch...
Comment 12 michael.brauer 2005-03-11 10:01:37 UTC
Patch as been manually applied.
Comment 13 michael.brauer 2005-03-14 10:49:07 UTC
.

re-open issue and reassign to es@openoffice.org
Comment 14 michael.brauer 2005-03-14 10:49:11 UTC
reassign to es@openoffice.org
Comment 15 michael.brauer 2005-03-14 10:49:16 UTC
reset resolution to FIXED
Comment 16 eric.savary 2005-03-18 15:25:15 UTC
Verified in cws fwkfinal1
Comment 17 eric.savary 2005-03-27 11:17:24 UTC
Ok in src680m89