Bug 247471 - devel/libedit: Unicode problems (readline compatibility filename completion/input)
Summary: devel/libedit: Unicode problems (readline compatibility filename completion/i...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-22 08:38 UTC by Peter Eriksson
Modified: 2020-06-22 08:39 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bapt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2020-06-22 08:38:58 UTC
When building a simple test program (at least when using libedit's readline compatibility code) it mishandles Unicode characters.

% touch räksmörgås.txt

% cc -I/usr/local/include -DUSE_LIBREADLINE=1 -o tr tr.c -L/usr/local/lib -lreadline
% ./tr
>räksmörgås.txt 
18 bytes

% cc -I/usr/local/include -DUSE_LIBEDIT -o tr tr.c -L/usr/local/lib -ledit
% ./tr
>r\U+00C3\U+00A4ksm\U+00C3\U+00B6rg\U+00C3\U+00A5s.txt 
18 bytes

(type "r" then TAB for tab-completion).

Also libedit doesn't really allow me to enter non us-ascii characters at all.

This is different behaviour from gnu readline (see the attached simple test program). 

Behavior is the same on FreeBSD 11.3-RELEASE and CURRENT.