How convert text to hex value?How can I convert hexidecimal values to base 10 in hexl-mode?Convert a word into an acronymIs there a way to convert an array of bytes into a UTF-8 string?Swap text before and after “=” in properties fileEnter hex numbers continuously in hexl-modeMeaningful Copy/Paste in hexl-modeIs there a function in emacs that centers an input text and fills the line with the comment symbol as one would use it for headings in a file?Is it Possible to automate file editing using emacs?How remove whitespaces in the beginning of lines?How show (filter) only text lines with all uppercase chars?
pgfmath does not work
How to describe POV characters?
How does mmorpg store data?
Reusable spacecraft: why still have fairings detach, instead of open/close?
Why isn't UDP with reliability (implemented at Application layer) a substitute of TCP?
Android Studio 3.6 canary 6 - Gradle throwing DefaultProjectSyncIssues exception
If I have the War Caster feat, can I use the Thorn Whip cantrip to stop an enemy caster from escaping using the Dimension Door spell?
How do I tell the reader that my character is autistic in Fantasy?
Converting Geographic Coordinates into Lambert2008 coordinates
Bin Packing with Relational Penalization
13th chords on guitar
Why was Pan Am Flight 103 flying over Lockerbie?
Compiling all Exception messages into a string
Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?
Why was p[:] designed to work differently in these two situations?
Why would anyone even use a Portkey?
Word ending in "-ine" for rat-like
The Football Squad
How can I open this door latch with the knobs removed?
Why wasn't EBCDIC designed with contiguous alphanumeric characters?
Active wildlife outside the window- Good or Bad for Cat psychology?
Is it okay to submit a paper from a master's thesis without informing the advisor?
Does a return economy-class seat between London and San Francisco release 5.28 tonnes of CO2 equivalents?
Alien life interbreeding with Earth life
How convert text to hex value?
How can I convert hexidecimal values to base 10 in hexl-mode?Convert a word into an acronymIs there a way to convert an array of bytes into a UTF-8 string?Swap text before and after “=” in properties fileEnter hex numbers continuously in hexl-modeMeaningful Copy/Paste in hexl-modeIs there a function in emacs that centers an input text and fills the line with the comment symbol as one would use it for headings in a file?Is it Possible to automate file editing using emacs?How remove whitespaces in the beginning of lines?How show (filter) only text lines with all uppercase chars?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I has some sybmol, e.g. O and I want to convert it to hex value.
The result must be 4f
How I can do this in Emacs 26.1 ?
text hexl-mode
add a comment |
I has some sybmol, e.g. O and I want to convert it to hex value.
The result must be 4f
How I can do this in Emacs 26.1 ?
text hexl-mode
add a comment |
I has some sybmol, e.g. O and I want to convert it to hex value.
The result must be 4f
How I can do this in Emacs 26.1 ?
text hexl-mode
I has some sybmol, e.g. O and I want to convert it to hex value.
The result must be 4f
How I can do this in Emacs 26.1 ?
text hexl-mode
text hexl-mode
edited Jun 20 at 17:07
Alexei
asked Jun 20 at 15:17
AlexeiAlexei
8783 silver badges12 bronze badges
8783 silver badges12 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can simply run M-x eval-expression and type ?O. You will get the following output in the minibuffer:
79 (#o117, #x4f, ?O)
C-x =(what-cursor-position) works as well, it prints something like "Char: O (79, #o117, #x4f) point=146 of 146 (99%) column=0".
– xuchunyang
Jun 20 at 23:31
Nice, I didn't know about?0. A side note, by defaulteval-expressionis bounded toM-:which make it much faster...
– Pouya
Jun 21 at 12:47
add a comment |
Maybe no so elegant but should do the trick. Note I have assigned it to "C-." which might be used by other functions in your setup. Reassign as you wish:
(defun hexify()
(interactive)
(setq hx (format "%x" (char-before)))
(delete-backward-char 1)
(insert hx))
(global-set-key (kbd "C-.") 'hexify)
Calling the function, replaces the character before the cursor with its hex. If you just want the value Arkadiusz's answer will do.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "583"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f51149%2fhow-convert-text-to-hex-value%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can simply run M-x eval-expression and type ?O. You will get the following output in the minibuffer:
79 (#o117, #x4f, ?O)
C-x =(what-cursor-position) works as well, it prints something like "Char: O (79, #o117, #x4f) point=146 of 146 (99%) column=0".
– xuchunyang
Jun 20 at 23:31
Nice, I didn't know about?0. A side note, by defaulteval-expressionis bounded toM-:which make it much faster...
– Pouya
Jun 21 at 12:47
add a comment |
You can simply run M-x eval-expression and type ?O. You will get the following output in the minibuffer:
79 (#o117, #x4f, ?O)
C-x =(what-cursor-position) works as well, it prints something like "Char: O (79, #o117, #x4f) point=146 of 146 (99%) column=0".
– xuchunyang
Jun 20 at 23:31
Nice, I didn't know about?0. A side note, by defaulteval-expressionis bounded toM-:which make it much faster...
– Pouya
Jun 21 at 12:47
add a comment |
You can simply run M-x eval-expression and type ?O. You will get the following output in the minibuffer:
79 (#o117, #x4f, ?O)
You can simply run M-x eval-expression and type ?O. You will get the following output in the minibuffer:
79 (#o117, #x4f, ?O)
answered Jun 20 at 16:11
Arkadiusz DrabczykArkadiusz Drabczyk
2261 silver badge6 bronze badges
2261 silver badge6 bronze badges
C-x =(what-cursor-position) works as well, it prints something like "Char: O (79, #o117, #x4f) point=146 of 146 (99%) column=0".
– xuchunyang
Jun 20 at 23:31
Nice, I didn't know about?0. A side note, by defaulteval-expressionis bounded toM-:which make it much faster...
– Pouya
Jun 21 at 12:47
add a comment |
C-x =(what-cursor-position) works as well, it prints something like "Char: O (79, #o117, #x4f) point=146 of 146 (99%) column=0".
– xuchunyang
Jun 20 at 23:31
Nice, I didn't know about?0. A side note, by defaulteval-expressionis bounded toM-:which make it much faster...
– Pouya
Jun 21 at 12:47
C-x = (what-cursor-position) works as well, it prints something like "Char: O (79, #o117, #x4f) point=146 of 146 (99%) column=0".– xuchunyang
Jun 20 at 23:31
C-x = (what-cursor-position) works as well, it prints something like "Char: O (79, #o117, #x4f) point=146 of 146 (99%) column=0".– xuchunyang
Jun 20 at 23:31
Nice, I didn't know about
?0. A side note, by default eval-expression is bounded to M-: which make it much faster...– Pouya
Jun 21 at 12:47
Nice, I didn't know about
?0. A side note, by default eval-expression is bounded to M-: which make it much faster...– Pouya
Jun 21 at 12:47
add a comment |
Maybe no so elegant but should do the trick. Note I have assigned it to "C-." which might be used by other functions in your setup. Reassign as you wish:
(defun hexify()
(interactive)
(setq hx (format "%x" (char-before)))
(delete-backward-char 1)
(insert hx))
(global-set-key (kbd "C-.") 'hexify)
Calling the function, replaces the character before the cursor with its hex. If you just want the value Arkadiusz's answer will do.
add a comment |
Maybe no so elegant but should do the trick. Note I have assigned it to "C-." which might be used by other functions in your setup. Reassign as you wish:
(defun hexify()
(interactive)
(setq hx (format "%x" (char-before)))
(delete-backward-char 1)
(insert hx))
(global-set-key (kbd "C-.") 'hexify)
Calling the function, replaces the character before the cursor with its hex. If you just want the value Arkadiusz's answer will do.
add a comment |
Maybe no so elegant but should do the trick. Note I have assigned it to "C-." which might be used by other functions in your setup. Reassign as you wish:
(defun hexify()
(interactive)
(setq hx (format "%x" (char-before)))
(delete-backward-char 1)
(insert hx))
(global-set-key (kbd "C-.") 'hexify)
Calling the function, replaces the character before the cursor with its hex. If you just want the value Arkadiusz's answer will do.
Maybe no so elegant but should do the trick. Note I have assigned it to "C-." which might be used by other functions in your setup. Reassign as you wish:
(defun hexify()
(interactive)
(setq hx (format "%x" (char-before)))
(delete-backward-char 1)
(insert hx))
(global-set-key (kbd "C-.") 'hexify)
Calling the function, replaces the character before the cursor with its hex. If you just want the value Arkadiusz's answer will do.
edited Jun 21 at 12:44
answered Jun 20 at 15:48
PouyaPouya
1486 bronze badges
1486 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Emacs Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f51149%2fhow-convert-text-to-hex-value%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown