Fossil Forum

Can `fossil grep` handle non-ASCII characters (UTF-8) ?
Login

Can `fossil grep` handle non-ASCII characters (UTF-8) ?

Can `fossil grep` handle non-ASCII characters (UTF-8) ?

(1) By Mizuno J. Yuta (mjyuta) on 2021-02-18 04:45:01 [source]

The fossil grep documentation has a description of Unicode characters. But it doesn't seem to really work.

# make test repository
fossil init ../test.fossil
fossil open ../test.fossil
echo 'emoji: 😀, cjk: 字, arrow: ↑' > test_utf8.txt
fossil add test_utf8.txt
fossil commit -m 'save.'

# try grep unicode characters
# -> does not work
fossil grep '😀' test_utf8.txt
fossil grep 'å­—' test_utf8.txt
fossil grep '↑' test_utf8.txt

# use escape sequences
# -> does not work
fossil grep '\xf0\x9f\x98\x80' test_utf8.txt

Please let me know if there is any way. As a Japanese user, I am very happy to be able to handle UTF-8.

Thanks.

(2) By george on 2021-02-18 10:56:34 in reply to 1 [link] [source]

Perhaps a related issue: some search terms are not properly emphasized.
Examples: one and two.