Comments (32)
Try looking at the r2r bins bins/pe/testapp-msvc64.exe
, bins/elf/strenc
and bins/elf/strenc-guess-utf32le
. They don't cover all the things posted though and could be more comprehensive.
The test binaries were produced using string literals (C / C++).
Btw, there are some UTF utility functions in libr/util/utf8.c
/ utf16.c
/ utf32.c
. Better not to have duplicate code.
I see you did:
- Support for fullwidth characters in graph mode
Thanks!
from ideas.
Actually at least for Arabic, shaping is not that complex. Remember that in real life shaping has to be done manually by kids.
from ideas.
For the RTL part - it supports Arabic filenames and comments but fails only in direction:
from ideas.
#include <stdio.h>
int main(void) {
printf("ÄÖæxßf®\n");
return 0;
}
Actual result:
[0x00400410]> fs strings
[0x00400410]> f
0x004005a4 13 str.____x__f
Expected result:
[0x00400410]> fs strings
[0x00400410]> f
0x004005a4 13 str.ÄÖæxßf®\n
from ideas.
flags cant contain strange chars, and by strange i mean non-7bit-ascii
thats how the r_name_filter() works
not going to fix/change this before the release. flags needs to be rewritten to use sdb
On 16 Apr 2015, at 17:52, schrotthaufen [email protected] wrote:
#include <stdio.h>
int main(void) {
printf("ÄÖæxßf®\n");
return 0;
}
Actual result:
[0x00400410]> fs strings
[0x00400410]> f
0x004005a4 13 str.____x__fExpected result:
[0x00400410]> fs strings
[0x00400410]> f
0x004005a4 13 str.ÄÖæxßf®\n—
Reply to this email directly or view it on GitHub https://github.com/radare/radare2/issues/2032#issuecomment-93769332.
from ideas.
@radare updated the bug, thanks!
from ideas.
Btw, Arabic comments are working in the mlterm:
from ideas.
In Hebrew, using XTERM terminal - the comments are being represented, however they are written the other around as a problem in XTERM in general that the first character is in the left and the next one is afterwards, ltr instead of rtl(reverts the text).
Example given:
- proper:
זאת הערה - how it is actually represented:
הרעה תאז
As written in xterm/README(https://github.com/joejulian/xterm/blob/master/README.i18n)
"Xterm does not support bi-directional or RTL languages such as Hebrew
and Arab."
From a little bit of research I am taking a look into another console which might offer the support for rtl languages and it will be more correct to operate r2 under that console
from ideas.
@holdsworth try mlterm
from ideas.
@XVilka mlterm doesn't represent Hebrew at all, with Konsole it works perfectly fine for some reason.
from ideas.
please update the checkboxes
from ideas.
please be more precise
from ideas.
cc @kazarmy
from ideas.
CC @queenp
from ideas.
I've run r2 in a (Linux) Emacs shell and it works fine for RTL and Arabic shaping (visual mode is unusable though). For consoles that don't support RTL, implementing a full-fledged Unicode Bidirectional Algorithm in r2 appears to require humongous and probably-not-worth-it effort but a simple algorithm that reverses Arabic and Hebrew character sequences shouldn't be hard to do. An Arabic shaping algorithm shouldn't be hard to do either.
from ideas.
May be have an option to work with FriBiDi somehow for bidirectional texts. But first, all visual modes should be fixed to properly work with Unicode and RTL chars.
from ideas.
May be have an option to work with FriBiDi somehow for bidirectional texts.
Yep. Output of:
r2 -c 'iz~Arabic:2' -q bins/pe/testapp-msvc64.exe | fribidi --nobreak
appears promising (testapp-msvc64.exe
is an r2r binary).
from ideas.
We need better page for BiDirectional text support across terminals, like we did for TrueColors. So it will be easier to push terminal developers and easier track the progress.
from ideas.
radareorg/radare2#9608 is also related
from ideas.
@Vane11ope can you please try to enable the unicode reflines and stuff in the visual panels code?
from ideas.
@cyanpencil @Vane11ope @kazarmy please help to review the current state, and what is needed to be done.
from ideas.
@kazarmy do you for any chance have a binary on which we can test the things you just posted?
Or did you test them by inserting a comment in the disasm?
from ideas.
merged @kazarmy checkbox with main post
from ideas.
Btw, there are some UTF utility functions in libr/util/utf8.c / utf16.c / utf32.c. Better not to have duplicate code.
Unfortunately I knew the existence of that file, but did not read it throughly and re-implemented function r_utf8_decode
... will fix it in the next pr
Thanks for the heads up!
from ideas.
From what I know shaping and diacritics will require dependency on ICU, no less. Those are very complex algorithms and depend highly on the language.
from ideas.
For a future reference - mintty/mintty#837
from ideas.
This library seems also interesting https://github.com/JuliaStrings/utf8proc
from ideas.
See also radareorg/radare2#12629
from ideas.
See https://terminal-wg.pages.freedesktop.org/bidi/ for details/proposal about BiDi
from ideas.
So it started: now implemented in VTE: https://terminal-wg.pages.freedesktop.org/bidi/implementations.html#vte
See also https://gist.github.com/XVilka/a0e49e1c65370ba11c17
from ideas.
Note, that with the release of GNOME 3.34 the support of BiDi is available in Gnome Terminal out of the box, which makes testing/implementing it in the other programs, such as radare2 way easier. FYI @deepakchethan
from ideas.
This issue has been moved from radareorg/radare2 to radareorg/ideas as we are trying to clean our backlog and this issue has probably been created a long while ago. This is an effort to help contributors understand what are the actionable items they can work on, prioritize issues better and help users find active/duplicated issues more easily. If this is not an enhancement/improvement/general idea but a bug, feel free to ask for re-transfer to main repo. Thanks for your understanding and contribution with this issue.
from ideas.
Related Issues (20)
- Add ag subcommand to do png and open it
- Bigger function with afu? HOT 2
- Implement organic graph layouts for browsing huge call/ref graphs
- pxr vs ad8 / ad4
- Non integrated code from r1 HOT 6
- Replacing ZIP and LZ4 code embeddings with libarchive HOT 5
- Radare is really hard to learn. I'm creating an interactive tutorial for r2. It's an openvim clone. HOT 1
- ESIL structured output + JSON representation HOT 16
- Make a port to Sailfish OS HOT 1
- Make a package for "winget" (Windows package manager from Microsoft)
- Implement toolchain provenance on radare
- SELECT ROP CHAIN GADGETS TOGETHER AUTOMATICALLY FOR MEMORY CORRUPTION VULN EXPLOITATION USING TURING MACHINE HOT 1
- implement an native decompiler in radare2
- Dynamic input in radare2 HOT 4
- patch binaries in edit mode like in vim for more vim philosophy HOT 3
- improve the r2 interpreter for a more bash syntax HOT 1
- recompile disassembly on x64 with nasm directives HOT 1
- use an unit test library more than only regression testing for code coverage HOT 11
- memory scanner on radare2 HOT 6
- emulate windows win32 api HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ideas.