Bug 84816 - ddd under utf-8 only partly loads files encoded in latin-1
ddd under utf-8 only partly loads files encoded in latin-1
Product: Red Hat Linux
Classification: Retired
Component: ddd (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
Depends On:
  Show dependency treegraph
Reported: 2003-02-21 12:05 EST by diego.santacruz
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-10-08 04:01:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description diego.santacruz 2003-02-21 12:05:25 EST
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:

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 12:28:21 EST
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 04:01:13 EDT
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.