Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 84816 - ddd under utf-8 only partly loads files encoded in latin-1
Summary: ddd under utf-8 only partly loads files encoded in latin-1
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ddd
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-21 17:05 UTC by diego.santacruz
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-08 08:01:13 UTC


Attachments (Terms of Use)

Description diego.santacruz 2003-02-21 17:05:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
when ddd loads a source code file encoded in latin-1 containing accented
characters and is executing under the utf-8 locale it chokes on the first
accented char and does not display any of the following text.

This is extremely confusing to the user and makes the debugger impossible to use.

Evidently latin-1 accented characters might be invalid utf-8 chars (just
guessing here, don't know for sure). However UTF-8 allows for resync on ASCII
chars and thus ddd should be able to recover from the error.

I guess the problem is more in openmotif than ddd, but I did not investigate.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. save a C source file with "Bézier" in a comment, in latin-1 encoding
2. compile C file
3. open program in ddd
4. ddd displays the source file only up to the B of Bézier
    

Actual Results:  Part of the source code is not displayed, since source code
viewer chops everything after the accented letter.

Expected Results:  The source file is displayed in its entirety (even though the
accented char might be incorrectly undisplayed).

Additional info:

Ideally ddd should be able to autodetect the encoding of the source file (as vim
or emacs), or a mechanism should be provided to select it.

Comment 1 diego.santacruz 2003-02-21 17:28:21 UTC
An additional example of this problem is the DDD reference window.

1. Show the DDD ref. window by selecting in the menu Help->DDD Reference.
2. Scroll the bottom pane all the way to the end.

The last thing displayed is "Dorothea L", under DDD Contributors, and nothing
more. The character just after the L is an accented char (ü). As a result, all
the interesting part of the DDD Reference cannot be seen.

If ddd is started under an 8 bit locale (i.e. LANG=C) this problem does not appear.

A quick workaround could be to set the locale to an 8 bit one (e.g., latin-1)
upon ddd startup. Anyhow, as far as I know, ddd is not internationalized.
Although this might have other implications.

Comment 2 Ngo Than 2003-10-08 08:01:13 UTC
it's fixed now in ddd-3.3.7-3, which will be available in rawhide soon. thanks
fo your report.


Note You need to log in before you can comment on or make changes to this bug.