Open ReelThe small label scene, spool by spool

Sheet Music Symbols and Why Most Will Not Paste

Seven characters do paste

These seven are in the Miscellaneous Symbols block, they encode in three bytes of UTF-8, and they survive a paste into a form field, a filename or a database row.

CharacterCodepointUnicode nameWhat it draws
♩U+2669QUARTER NOTEone note, no flag
♪U+266AEIGHTH NOTEone note, one flag
♫U+266BBEAMED EIGHTH NOTEStwo notes, one beam
♬U+266CBEAMED SIXTEENTH NOTEStwo notes, two beams
♭U+266DMUSIC FLAT SIGNlowers a note a semitone
♮U+266EMUSIC NATURAL SIGNcancels a sharp or flat
♯U+266FMUSIC SHARP SIGNraises a note a semitone

Four of them are broken out on music note symbols and three on sharp and flat symbols. That is the entire music repertoire below U+FFFF: no clef, no rest, no time signature, no dynamic.

The block that holds everything else

Unicode does encode the rest of Western notation. The Musical Symbols block runs from U+1D100 to U+1D1FF, 256 slots of which 233 are assigned: every clef, every rest, note heads, barlines, repeat signs, dynamics, ornaments, pedal marks, and mensural and Kievan notation on top. It is a thorough job, and every character in it is unusable anywhere that will not take four bytes, for a reason that has nothing to do with music.

Three bytes against four

In UTF-8 a character's byte length follows its codepoint. Everything up to U+FFFF fits in one, two or three bytes. Everything above U+FFFF needs four. ♩ QUARTER NOTE is three bytes; U+1D15F MUSICAL SYMBOL QUARTER NOTE, which draws the same thing, is four.

That boundary is load-bearing because a store or a field can be built to accept a maximum of three bytes per character and still call itself UTF-8. Send a four-byte character to one and it is refused, or the text is cut at that point and everything after it is lost. Nothing warns you at the keyboard; the character looks fine until it is written down.

UTF-16 draws the line differently. Above U+FFFF a character becomes a surrogate pair, two code units instead of one, so anything counting a length in UTF-16 units counts a clef as two. A truncation that cuts at an arbitrary unit can slice the pair in half and leave a broken half-character.

Fonts are a separate problem on top of encoding: bytes can arrive intact and still show a box, if whatever is drawing the text has no glyph for that codepoint.

Thirty-eight of the 233 are not standalone characters

Even where the bytes arrive, not every slot is a mark you can drop into a line of text. Of the 233 assigned characters, 22 are non-spacing combining marks and 8 are spacing combining marks: they attach to the character before them rather than standing alone. A further 8, from U+1D173 MUSICAL SYMBOL BEGIN BEAM to U+1D17A MUSICAL SYMBOL END PHRASE, are format characters with no visible shape at all. The remaining 195 are ordinary symbols.

The notation characters, by codepoint

Names below come straight from the Unicode character database. There is no column of characters to copy, because wherever the four-byte limit bites there would be nothing to see. If your software takes a codepoint, this is the number to give it.

CodepointUnicode nameWhat it marks
U+1D100MUSICAL SYMBOL SINGLE BARLINEstarts and separates bars
U+1D101MUSICAL SYMBOL DOUBLE BARLINEmarks the end of a section
U+1D102MUSICAL SYMBOL FINAL BARLINEmarks the end of the piece
U+1D106MUSICAL SYMBOL LEFT REPEAT SIGNopens a repeated passage
U+1D107MUSICAL SYMBOL RIGHT REPEAT SIGNcloses a repeated passage
U+1D109MUSICAL SYMBOL DAL SEGNOjump back to the segno
U+1D10AMUSICAL SYMBOL DA CAPOjump back to the start
U+1D10BMUSICAL SYMBOL SEGNOthe point a dal segno returns to
U+1D10CMUSICAL SYMBOL CODAthe tail section jumped to at the end
U+1D110MUSICAL SYMBOL FERMATAhold the note beyond its written length
U+1D11EMUSICAL SYMBOL G CLEFthe treble clef
U+1D121MUSICAL SYMBOL C CLEFthe alto and tenor clef
U+1D122MUSICAL SYMBOL F CLEFthe bass clef
U+1D129MUSICAL SYMBOL MULTIPLE MEASURE RESTone sign standing for several silent bars
U+1D12AMUSICAL SYMBOL DOUBLE SHARPraises a note two semitones
U+1D12BMUSICAL SYMBOL DOUBLE FLATlowers a note two semitones
U+1D134MUSICAL SYMBOL COMMON TIMEthe C-shaped four-four time signature
U+1D135MUSICAL SYMBOL CUT TIMEthe struck C, two-two time
U+1D13BMUSICAL SYMBOL WHOLE RESTsilence for a whole bar
U+1D13CMUSICAL SYMBOL HALF RESTsilence for two beats in four-four
U+1D13DMUSICAL SYMBOL QUARTER RESTsilence for one beat in four-four
U+1D13EMUSICAL SYMBOL EIGHTH RESTsilence for half a beat
U+1D13FMUSICAL SYMBOL SIXTEENTH RESTsilence for a quarter of a beat
U+1D15CMUSICAL SYMBOL BREVEthe double whole note
U+1D15DMUSICAL SYMBOL WHOLE NOTEfour beats in four-four
U+1D15EMUSICAL SYMBOL HALF NOTEtwo beats in four-four
U+1D15FMUSICAL SYMBOL QUARTER NOTEone beat in four-four
U+1D160MUSICAL SYMBOL EIGHTH NOTEhalf a beat
U+1D18FMUSICAL SYMBOL PIANOthe p in dynamics
U+1D190MUSICAL SYMBOL MEZZOthe m in mp and mf
U+1D191MUSICAL SYMBOL FORTEthe f in dynamics
U+1D192MUSICAL SYMBOL CRESCENDOthe opening hairpin, get louder
U+1D193MUSICAL SYMBOL DECRESCENDOthe closing hairpin, get quieter
U+1D196MUSICAL SYMBOL TRthe trill mark
U+1D1AEMUSICAL SYMBOL PEDAL MARKput the sustain pedal down
U+1D1AFMUSICAL SYMBOL PEDAL UP MARKlift the sustain pedal

Chord symbols are built from ordinary characters

A chord symbol is not one character. C♭m7 is a letter, a sign, a letter and a digit. Beyond the accidentals, the marks that are not letters are the ring of the diminished chord, typed as ° U+00B0 DEGREE SIGN; the slashed o of the half-diminished, typed as ø U+00F8 LATIN SMALL LETTER O WITH STROKE; and the triangle of the major seventh, typed as Δ U+0394 GREEK CAPITAL LETTER DELTA. All are below U+FFFF, so a chord chart written this way pastes whole.

What to use instead

For a clef or a rest in running text, a picture of the notation is the only thing that looks the same everywhere it lands. For note values, accidentals and chord names, use the seven above and stay below U+FFFF. Music symbols indexes the rest of this wing.