♫ E2 99 AB beamed eighth notes
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 7
- Joined: Sat Aug 09, 2014 8:08 pm
♫ E2 99 AB beamed eighth notes
Hello All, Happy Holidays!
I'm planning to manually edit SRTs (i.e., UTF-8 movie subtitles). The only UTF-8 character I need to add is code point E2 99 AB (i.e., beamed eighth notes, to signal that music is playing).
Is there a way to add that code point to the Clip Library? Or, is there any other place to put it so I can simply copy it into the SRT when it is needed?
Thanks,
Mark.
I'm planning to manually edit SRTs (i.e., UTF-8 movie subtitles). The only UTF-8 character I need to add is code point E2 99 AB (i.e., beamed eighth notes, to signal that music is playing).
Is there a way to add that code point to the Clip Library? Or, is there any other place to put it so I can simply copy it into the SRT when it is needed?
Thanks,
Mark.
Re: ♫ E2 99 AB beamed eighth notes
That's the UTF-8 encoding of the actual Unicode code point U+266B.markfilipak wrote: Mon Dec 23, 2024 8:10 pmUTF-8 character ... code point E2 99 AB (i.e., beamed eighth notes
Yes, you can do that:
Right click on the Clip Library combobox, then choose "New book...". As per the Save dialog you'll notice it will be a *.TCL file. You can see already existing clip libraries in TextPad's installation under \Samples\, f.e. "doschar.tcl". Insert the characters you want, adhere to the syntax standard, then save the file in UTF-8.AmigoJack wrote: Fri Jun 02, 2023 8:23 amClip libraries in UTF-8 (speak: Unicode) became available with 8.4.0
The help file explains the format under How To... > Use the Clip Library > Direct Editing:
Maybe more up to date help files have added a hint to UTF-8. In any case: save the file in UTF-8 encoding. As for the !CHARSET= definition try multiple things:Header:where:Code: Select all
!TCL=<id>, <comment> !TITLE=<title> !SORT=<y|n> !CHARSET=<charset>
Clippings:
- <id> is an identification number in the range 1-999 (numbers above that are reserved for our sample clip books). It must be unique for each clip book.
- <comment> is any text, such as the author's name.
- <title> is a short name that you will use to select this book.
- <charset> is one of ANSI, ARABIC, BALTIC, CHINESEBIG5, DEFAULT, DOS, EASTEUROPE, GB2312, GREEK, HANGEUL, HANGUL, HEBREW, JOHAB, MAC, RUSSIAN, SHIFTJIS, SYMBOL, THAI, TURKISH, VIETNAMESE. If omitted, it defaults to ANSI. If set to DEFAULT, the default character set for Windows will be used. This value controls which font is used to display the list of clipping titles and will only have an effect if the corresponding code page is available in Windows.
where:Code: Select all
!TEXT=<title> <clipping> !
- <title> is a short name that you will use to select this clipping, and to sort them, if required.
- <clipping> is any text, except for an "!" in column 1. If your own text must start with "!", escape it using "\!". The characters \^ will be interpreted as the hot spot. If you need to use \^ literally, escape it using \\^.
- ! marks the end of a clipping. Precede it with a blank line, if you want the clipping to finish with a line break.
- omit it
- use UTF-8 as <charset>
- use UTF8 as <charset>
- use DEFAULT as <charset>
Re: ♫ E2 99 AB beamed eighth notes
"E2 99 AB" is not a Unicode character, so I'm not sure what you mean by that. You can enter any Unicode character by typing its hex code point followed by Alt+X (assuming you have TextPad 9.6.0 or 8.20.0 and later). For the beamed eighth, you would type:
You could create a clip library containing it as follows:
Save that as %APPDATA%\Helios\TextPad\9\Music.tcl then restart TextPad.
Code: Select all
266bAlt+X
Code: Select all
!TCL=9835,
!TITLE=Music
!SORT=N
!CHARSET=UTF-8
!TEXT=♪ Single Eighth
♪
!
!TEXT=♫ Beamed Eighth
♫
!
-
- Posts: 7
- Joined: Sat Aug 09, 2014 8:08 pm
Re: ♫ E2 99 AB beamed eighth notes
Code: Select all
!TCL=2,
!TITLE=UTF-8
!SORT=Y
!CHARSET=UTF-8
!TEXT=♫ beamed eighth notes
♫
!
As a more convenient alternative, is it possible to bind ♫ to Ctrl+Alt+M?
Added note:
"E2 99 AB" is apparently the bytes. I found out via a binary editor. Then I searched the net for:
E2 99 AB
Re: ♫ E2 99 AB beamed eighth notes
- Start the macro recorder.
- Type Alt+X, then 266b.
- Stop the recorder.
- Save the macro.
- Assign a shortcut using Configure » Preferences » Keyboard » Macros.
- Enjoy your holiday!
Last edited by AmigoJack on Thu Dec 26, 2024 8:15 am, edited 1 time in total.
Reason: correct Alt+X sequence
Reason: correct Alt+X sequence
-
- Posts: 7
- Joined: Sat Aug 09, 2014 8:08 pm
Re: ♫ E2 99 AB beamed eighth notes
It didn't work. When I typed "266b" with recorder ON, the letters "266b" went into the document. Then, when I typed Alt-X, I got a beep. When I play back the macro, "266b", not the UTF-8 music symbol, goes into the document.
Last edited by AmigoJack on Thu Dec 26, 2024 8:07 am, edited 1 time in total.
Reason: reducing full quote to relevant quote
Reason: reducing full quote to relevant quote
Re: ♫ E2 99 AB beamed eighth notes
Hmm, it seems that the Alt+X command is not being recorded. I should have checked that!
To work around this, edit the macro using:
Configure » Preferences » Macros » your-macro » Edit
Replace "266b" with "♫" and save it.
To work around this, edit the macro using:
Configure » Preferences » Macros » your-macro » Edit
Replace "266b" with "♫" and save it.
Re: ♫ E2 99 AB beamed eighth notes
That was a typo. Of course:
In the help file you find that under How To... > Edit Text > Type Multilingual Characters.
- press Alt+X (so a text edit appears at the text cursor)
- type the code point (f.e. "266b" without the quotes)
- press ENTER (so the text edit disappears and the appropriate character ♫ is inserted into the document).
In the help file you find that under How To... > Edit Text > Type Multilingual Characters.
-
- Posts: 7
- Joined: Sat Aug 09, 2014 8:08 pm
Re: ♫ E2 99 AB beamed eighth notes
Well, first: The macro from yesterday didn't survive the night.
And second: All I get is "266b" inserted into the document.
Third: Alt-X just 'dongs'.
Fourth: If I edit the macro to just the letters 266b, I get an error: "Unexpected input near 266".
Confession: I've used TP every day, all day for well over 20 years but have never been happy with the way TWSes work. In this case, '_subtitles_chapters.tws' forgot the macro created yesterday.
AmigoJack, you wrote "That was a typo." What was a typo?
Running TP 8.20.2 in Win7.
And second: All I get is "266b" inserted into the document.
Third: Alt-X just 'dongs'.
Fourth: If I edit the macro to just the letters 266b, I get an error: "Unexpected input near 266".
Confession: I've used TP every day, all day for well over 20 years but have never been happy with the way TWSes work. In this case, '_subtitles_chapters.tws' forgot the macro created yesterday.
AmigoJack, you wrote "That was a typo." What was a typo?
Running TP 8.20.2 in Win7.
-
- Posts: 7
- Joined: Sat Aug 09, 2014 8:08 pm
Re: ♫ E2 99 AB beamed eighth notes
I've noticed something else. If I insert the UTF-8 'beamed 8th notes' character via the Clip Library, it appears in the document I'm current editing. However, the document I'm currently editing is code space 1252 -- it's a Windows '.cmd' file. That a unicode character would be inserted into a code space 1252 document doesn't make sense to me.
-
- Posts: 7
- Joined: Sat Aug 09, 2014 8:08 pm
Re: ♫ E2 99 AB beamed eighth notes
I think that, maybe, the reason that '_subtitles_chapters.tws' did not remember the macro created yesterday is because I didn't update '_subtitles_chapters.tws'? If that's the case, it would be helpful if TP prompted to update the TWS when I quit TP with a TWS that has changed.
Re: ♫ E2 99 AB beamed eighth notes
This can still be read in previous posts: the original instruction was "Type 266bAlt+X" and I clarified it to "press Alt+X first, then type "266b"".
Batch files can also be saved in UTF-16.markfilipak wrote: Thu Dec 26, 2024 6:40 pmthe document I'm currently editing is code space 1252 -- it's a Windows '.cmd' file
TextPad is a text editor - it cannot foresee in which code page (not "space") you will save the current document - it doesn't has to be the same as the currently detected one. Hence, it would be too restrictive to disallow all characters which are not known to the current code page/encoding. Also ♫ is not solely a Unicode character - it already existed in code page 437.markfilipak wrote: Thu Dec 26, 2024 6:40 pmThat a unicode character would be inserted into a code space 1252 document doesn't make sense to me
Re: ♫ E2 99 AB beamed eighth notes
If a character in a document can't be saved in its original code page, you'll be prompted to choose a different encoding when you save it.That a unicode character would be inserted into a code space 1252 document doesn't make sense to me.
Assuming it wasn't the scratch macro, its TWS file would still exist and can be added to the Macros menu in the usual way. It may have been removed from the menu because you had more than one instance of TextPad running and the last one to close did not have it on the menu.The macro from yesterday didn't survive the night.
If you edit it as I suggested above, that would not happen.If I edit the macro to just the letters 266b, I get an error: "Unexpected input near 266".
Re: ♫ E2 99 AB beamed eighth notes
That's incorrect. In code page 437, character 14 was originally displayed as beamed sixteenth notes (♬) and represented "two musical notes". MS and later Unicode mapped that character to beamed eighth notes (♫). Other standards map it differently.AmigoJack wrote: Fri Dec 27, 2024 8:48 am TextPad is a text editor - it cannot foresee in which code page (not "space") you will save the current document - it doesn't has to be the same as the currently detected one. Hence, it would be too restrictive to disallow all characters which are not known to the current code page/encoding. Also ♫ is not solely a Unicode character - it already existed in code page 437.