Bug 3152 - using UTF-8 encoding in install/ update
Summary: using UTF-8 encoding in install/ update
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P1 critical (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Vlad Klicnik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:50 EDT by Vlad Klicnik CLA
Modified: 2002-04-16 20:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Klicnik CLA 2001-10-10 22:50:21 EDT
We should ensure that we do not use String.getBytes() anywhere in the core except where we 
call the core dll to do file work.  In general, marshaling of strings etc should be done using UTF8
(readUTF and writeUTF) as this will preserve the data in the face of locale changes.

NOTES:

DJH (8/13/01 12:11:35 PM)
	In boot.update, are these problems?
		LogStore.save(Log, URL)
		XmlLiteStore.save(XmlLite, URL)

RTP (8/15/01 4:40:28 PM)
	I suspect this code belongs to update as well:

	org.eclipse.core.internal.boot.LaunchInfo.checkUpdateEnabled() {
	...
			byte[] b = EOF.getBytes();   <<<<<------
			uos = new FileOutputStream(f);
			uos.write(b);
	...
	}


LC (8/16/01 4:54:29 PM)
		- XmlLiteStore.save(XmlLite, URL) is never called
		- LogStore.save(Log, URL)	writes out a log that is not read in by the UM again, it is only 
			meant as	a record of what has taken place.  The user can read it (with something like notepad) 
			if he/she's interested.  The translated msgs in this log file is written in native format.   I think 
			it is appropriate to leave this unchanged.
		- LaunchInfo.checkUpdateEnabled() checks if the file system is r/w.   The file written contains no
			useful info as far as i know.

RTP (8/23/01 2:51:07 PM)
	Also, LaunchInfo.chekpoint() writes to disk using PrintWriter and the default encoding.
Not sure if this needs to change or not.

VK (8/28/01 2:21:41 PM)
	The temp files written by the update fns are part of the local install tree (not part of the workbench that can be
	exchanged) so local encoding is appropriate. Moving this PR to InBox to see if we want to change to use
	UTF-8 (for consistency) as part of the 2.0 rework.
Comment 1 DJ Houghton CLA 2001-10-24 06:46:12 EDT
PRODUCT VERSION:

0.9

Comment 2 Vlad Klicnik CLA 2002-01-22 12:55:17 EST
This defect is applicable to 2.0. We need to ensure we use UTF-8 where 
appropriate (in particular anywhere where there is potential of exchanging files 
or accessing files from systems set to different locales).
Comment 3 Christophe Elek CLA 2002-04-16 20:57:21 EDT
org.eclipse.update.internal.core.Writer now takes a file and an encoding string
as a parameter in the constructor

All xml writing (siteLocal.xml/Config.xml) go through this file.

To verify