# Output the International Phonetic Alphabet

The International Phonetic Alphabet is a system of phonetic notation intended to be able to accurately represent every sound used in spoken language.

The alphabet contains 29 vowel letters iyɨʉɯuɪʏʊeøɘɵɤoəɛœɜɞʌɔæɐaɶäɑɒ and 81 consonant letters, although I missed three (ɦǀǂ) when I first posted this challenge, so you only need to consider the following 78: mɱnɳɲŋɴpbtdʈɖcɟkɡqɢʡʔszʃʒʂʐɕʑɸβfvθðçʝxɣχʁħʕhʋɹɻjɰⱱɾɽʙrʀʜʢɬɮlɭʎʟɺǃʘǁɓɗᶑʄɠʛɧɥʍwɫ and . We'll be ignoring the various diacritics in use.

Your job is to output those characters exactly once each, not including the three letters I missed, and output no other non-whitespace characters. Since the IPA does not have an official ordering, you may output these characters in any order so if you find an order that permits a shorter approach feel free to use that.

You may output as much or as little whitespace as you want. The output of your program does not need to be constant, as long as the output always meets the specification above (so the order may vary, as may the amount and location of whitespace).

For the sake of convenience, here's a sorted list of all the characters and their unicode codepoints:

U+0061 LATIN SMALL LETTER A:    a
U+0062 LATIN SMALL LETTER B:    b
U+0063 LATIN SMALL LETTER C:    c
U+0064 LATIN SMALL LETTER D:    d
U+0065 LATIN SMALL LETTER E:    e
U+0066 LATIN SMALL LETTER F:    f
U+0068 LATIN SMALL LETTER H:    h
U+0069 LATIN SMALL LETTER I:    i
U+006a LATIN SMALL LETTER J:    j
U+006b LATIN SMALL LETTER K:    k
U+006c LATIN SMALL LETTER L:    l
U+006d LATIN SMALL LETTER M:    m
U+006e LATIN SMALL LETTER N:    n
U+006f LATIN SMALL LETTER O:    o
U+0070 LATIN SMALL LETTER P:    p
U+0071 LATIN SMALL LETTER Q:    q
U+0072 LATIN SMALL LETTER R:    r
U+0073 LATIN SMALL LETTER S:    s
U+0074 LATIN SMALL LETTER T:    t
U+0075 LATIN SMALL LETTER U:    u
U+0076 LATIN SMALL LETTER V:    v
U+0077 LATIN SMALL LETTER W:    w
U+0078 LATIN SMALL LETTER X:    x
U+0079 LATIN SMALL LETTER Y:    y
U+007a LATIN SMALL LETTER Z:    z
U+00e4 LATIN SMALL LETTER A WITH DIAERESIS: ä
U+00e6 LATIN SMALL LETTER AE:   æ
U+00e7 LATIN SMALL LETTER C WITH CEDILLA:   ç
U+00f0 LATIN SMALL LETTER ETH:  ð
U+00f8 LATIN SMALL LETTER O WITH STROKE:    ø
U+0127 LATIN SMALL LETTER H WITH STROKE:    ħ
U+014b LATIN SMALL LETTER ENG:  ŋ
U+0153 LATIN SMALL LIGATURE OE: œ
U+01c1 LATIN LETTER LATERAL CLICK:  ǁ
U+01c3 LATIN LETTER RETROFLEX CLICK:    ǃ
U+0250 LATIN SMALL LETTER TURNED A: ɐ
U+0251 LATIN SMALL LETTER ALPHA:    ɑ
U+0252 LATIN SMALL LETTER TURNED ALPHA: ɒ
U+0253 LATIN SMALL LETTER B WITH HOOK:  ɓ
U+0254 LATIN SMALL LETTER OPEN O:   ɔ
U+0255 LATIN SMALL LETTER C WITH CURL:  ɕ
U+0256 LATIN SMALL LETTER D WITH TAIL:  ɖ
U+0257 LATIN SMALL LETTER D WITH HOOK:  ɗ
U+0258 LATIN SMALL LETTER REVERSED E:   ɘ
U+0259 LATIN SMALL LETTER SCHWA:    ə
U+025b LATIN SMALL LETTER OPEN E:   ɛ
U+025c LATIN SMALL LETTER REVERSED OPEN E:  ɜ
U+025e LATIN SMALL LETTER CLOSED REVERSED OPEN E:   ɞ
U+025f LATIN SMALL LETTER DOTLESS J WITH STROKE:    ɟ
U+0260 LATIN SMALL LETTER G WITH HOOK:  ɠ
U+0261 LATIN SMALL LETTER SCRIPT G: ɡ
U+0262 LATIN LETTER SMALL CAPITAL G:    ɢ
U+0263 LATIN SMALL LETTER GAMMA:    ɣ
U+0264 LATIN SMALL LETTER RAMS HORN:    ɤ
U+0265 LATIN SMALL LETTER TURNED H: ɥ
U+0267 LATIN SMALL LETTER HENG WITH HOOK:   ɧ
U+0268 LATIN SMALL LETTER I WITH STROKE:    ɨ
U+026a LATIN LETTER SMALL CAPITAL I:    ɪ
U+026b LATIN SMALL LETTER L WITH MIDDLE TILDE:  ɫ
U+026c LATIN SMALL LETTER L WITH BELT:  ɬ
U+026d LATIN SMALL LETTER L WITH RETROFLEX HOOK:    ɭ
U+026e LATIN SMALL LETTER LEZH: ɮ
U+026f LATIN SMALL LETTER TURNED M: ɯ
U+0270 LATIN SMALL LETTER TURNED M WITH LONG LEG:   ɰ
U+0271 LATIN SMALL LETTER M WITH HOOK:  ɱ
U+0272 LATIN SMALL LETTER N WITH LEFT HOOK: ɲ
U+0273 LATIN SMALL LETTER N WITH RETROFLEX HOOK:    ɳ
U+0274 LATIN LETTER SMALL CAPITAL N:    ɴ
U+0275 LATIN SMALL LETTER BARRED O: ɵ
U+0276 LATIN LETTER SMALL CAPITAL OE:   ɶ
U+0278 LATIN SMALL LETTER PHI:  ɸ
U+0279 LATIN SMALL LETTER TURNED R: ɹ
U+027a LATIN SMALL LETTER TURNED R WITH LONG LEG:   ɺ
U+027b LATIN SMALL LETTER TURNED R WITH HOOK:   ɻ
U+027d LATIN SMALL LETTER R WITH TAIL:  ɽ
U+027e LATIN SMALL LETTER R WITH FISHHOOK:  ɾ
U+0280 LATIN LETTER SMALL CAPITAL R:    ʀ
U+0281 LATIN LETTER SMALL CAPITAL INVERTED R:   ʁ
U+0282 LATIN SMALL LETTER S WITH HOOK:  ʂ
U+0283 LATIN SMALL LETTER ESH:  ʃ
U+0284 LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK:   ʄ
U+0288 LATIN SMALL LETTER T WITH RETROFLEX HOOK:    ʈ
U+0289 LATIN SMALL LETTER U BAR:    ʉ
U+028a LATIN SMALL LETTER UPSILON:  ʊ
U+028b LATIN SMALL LETTER V WITH HOOK:  ʋ
U+028c LATIN SMALL LETTER TURNED V: ʌ
U+028d LATIN SMALL LETTER TURNED W: ʍ
U+028e LATIN SMALL LETTER TURNED Y: ʎ
U+028f LATIN LETTER SMALL CAPITAL Y:    ʏ
U+0290 LATIN SMALL LETTER Z WITH RETROFLEX HOOK:    ʐ
U+0291 LATIN SMALL LETTER Z WITH CURL:  ʑ
U+0292 LATIN SMALL LETTER EZH:  ʒ
U+0294 LATIN LETTER GLOTTAL STOP:   ʔ
U+0295 LATIN LETTER PHARYNGEAL VOICED FRICATIVE:    ʕ
U+0298 LATIN LETTER BILABIAL CLICK: ʘ
U+0299 LATIN LETTER SMALL CAPITAL B:    ʙ
U+029b LATIN LETTER SMALL CAPITAL G WITH HOOK:  ʛ
U+029c LATIN LETTER SMALL CAPITAL H:    ʜ
U+029d LATIN SMALL LETTER J WITH CROSSED-TAIL:  ʝ
U+029f LATIN LETTER SMALL CAPITAL L:    ʟ
U+02a1 LATIN LETTER GLOTTAL STOP WITH STROKE:   ʡ
U+02a2 LATIN LETTER REVERSED GLOTTAL STOP WITH STROKE:  ʢ
U+03b2 GREEK SMALL LETTER BETA: β
U+03b8 GREEK SMALL LETTER THETA:    θ
U+03c7 GREEK SMALL LETTER CHI:  χ
U+1d91 LATIN SMALL LETTER D WITH HOOK AND TAIL: ᶑ
U+2c71 LATIN SMALL LETTER V WITH RIGHT HOOK:    ⱱ

This is , so golf your code!

• This is pretty similar to this, this and this (outputting a Unicode alphabet). Personally, I'm not convinced they're similar enough to VTC as duplicate without hearing other user's opinions, but it wouldn't surprise me if there are some users that will consider this a duplicate of one or all of the linked challenges. Sep 24, 2020 at 16:29
• @cairdcoinheringaahing I'm aware of those challenges, but I felt like this would be different enough - the idea was that the length of the output and the lack of a defined order should hopefully let more creative approaches compete with string literals, while the fact that the codepoints in the IPA aren't contiguous should exclude many solutions used for the earlier challenges. But if the community disagrees, so be it. Sep 24, 2020 at 17:01
• Someone needs to answer this in IPEL! Sep 24, 2020 at 22:42
• @Lyxal Someone did. codegolf.stackexchange.com/a/211634/92481
– matt
Sep 25, 2020 at 15:00
• @SaraJ you are actually missing 2 clicks and the voiced glottal fricative. :)
– matt
Oct 23, 2020 at 16:05

# International Phonetic Esoteric Language, 110 bytes

Felt my esolang was appropriate for this.

Naïve approach. Pushes the characters as a string onto the stack, then prints with a newline:

"mɱnɳɲŋɴpbtdʈɖcɟkɡqɢʡʔszʃʒʂʐɕʑɸβfvθðçʝxɣχʁħʕhʋɹɻjɰⱱɾɽʙrʀʜʢɬɮlɭʎʟɺǃʘǁɓɗᶑʄɠʛɧɥʍwɫiyɨʉɯuɪʏʊeøɘɵɤoəɛœɜɞʌɔæɐaɶäɑɒ"o

Less naïve approach involving loops, 239 bytes.

{3F}{2P}ɑe{2V}əɐʌɔ|i|eχu|i|e1søɒ"äæçðøħŋœǁǃ"{HW}{GG}ɑe{GQ}əe{GT}əe{HJ}əe{HO}əe{HR}əɞɞɞɞɐʌɔ|j|eχu|j|e1søɒ{IQ}{I0}ɑe{IB}əe{IE}əe{IF}əe{II}əe{IM}əe{IO}əɞɞɞɞɞɐʌɔ|h|eχu|h|e1søɒ"βθχᶑⱱ"o

# JavaScript (Node.js),  163 161 156  154 bytes

_=>(c=96,i=20,g=n=>n?String.fromCharCode(c+=n&1n?1:1-~[...'10'+2e7,139,,108,6,34,45,6,7,,104][i--])+g(n/2n):'βθχᶑⱱ')(0x26affdebbffd7f5ff009ffffbfn)

Try it online!

### How?

The characters are ordered from lowest to highest code point.

Each 1 in the BigInt bit mask 0x26affdebbffd7f5ff009ffffbfn means that the code point c of the next character immediately follows the previous one. Each 0 means that the code point difference must be picked from a lookup array instead, which happens for the first time between f and h.

111010111111111000000001001111111111111111110111111
ɡɠɟɞɜɛəɘɗɖɕɔɓɒɑɐǃǁœŋħøðçæäzyxwvutsrqponmlkjihfedcba

100110101011111111110111101011101111111111110101111
ʢʡʟʝʜʛʙʘʕʔʒʑʐʏʎʍʌʋʊʉʈʄʃʂʁʀɾɽɻɺɹɸɶɵɴɳɲɱɰɯɮɭɬɫɪɨɧɥɤɣɢ

We add an offset of +2 to each value in the lookup array, including undefined entries.

The values are stored in reverse order to allow the compression trick [...'10'+2e7] for the last 10 entries, which expands to:

['1','0','2','0','0','0','0','0','0','0']

Because the code point differences for the last 5 characters βθχᶑⱱ are significantly larger, it's more beneficial to just hard-code them.

• I have more and more the feeling that you have home made scripts to find the shortest formulas for any serie of numbers :D Sep 30, 2020 at 15:56
• @Kaddath No scripts were harmed during the making of this answer! :-p Sep 30, 2020 at 16:01

# Charcoal, 82716866 62 bytes

⁻βg⭆⪪”)¶←@8⊘Φ@◧%↘Z⪪ξρ”³℅Ｉι⭆⌕Ａ”)∧←₂⁰Y⟧Ｇψ⊟∧⬤º”1℅⁺⁵⁹²ι”yβθχᶑⱱ

Try it online! Link is to verbose version of code (yay!). Explanation:

⁻βg

Output all of the lowercase letters except g.

⭆⪪”)¶←@8⊘Φ@◧%↘Z⪪ξρ”³℅Ｉι

Split the compressed string 228230231240248295331339449451 into 3-digit numbers and convert the code points into characters.

⭆⌕Ａ”)∧←₂⁰Y⟧Ｇψ⊟∧⬤º”1℅⁺⁵⁹²ι

Add 592 to the indices of all the 1s in the compressed string 11111111110110111111110110111111111111101111011011111000111111111110110011011101011 and convert the code points to characters.

”yβθχᶑⱱ

Output 3 literal Greek letters and two literal characters. The Greek letters are in Charcoal's code page so they only cost 1 byte, but they have to be quoted by the ”y to avoid being interpreted as Charcoal variable names. The final characters cost 3 bytes each.

• Does Charcoal's SBCS allow using characters outside its codepage? If not, the entire source code should be scored in UTF-8 instead. Sep 24, 2020 at 23:02
• @Bubbler It does, but they cost 3 bytes each. There's some encoding which I can't remember offhand. The deverbosifier normally counts the correct byte count.
– Neil
Sep 24, 2020 at 23:28
• OK, I found this in the docs (for others having the same question): "Note that the byte 0xFF indicates the start of a multi-byte character, which encodes all Unicode codepoints not in Charcoal's codepage." That's indeed a nice feature for challenges involving arbitrary Unicode chars. Sep 24, 2020 at 23:34
• @Bubbler I just checked and it's actually 3 bytes up to U+4079 and 4 bytes for higher code points.
– Neil
Sep 24, 2020 at 23:36

# 05AB1E, 63 bytes

Outputs the non-ascii characters in ascending order first, then the lowercase alphabet (without g).

•2£cÈ‹Jd$…•Ƶfв•¤4Àǝ„Æ43†ÂÄт4H·âeš¬•5вƵ¬6 15ŽPäŽEï)˜.¥ƵƵ+çJA'gK« Try it online! Commented: •2£c ... ŽEï)˜ encodes the deltas using a mix of integer and integer list compression. ... # compressed deltas .¥ # undelta ƵƵ+ # add 228 (ä) ç # convert to characters J # join to a single string A # push the lowercase alphabet 'gK # without 'g' « # concatenate both strings # implicit output # JavaScript, 184 183 bytes -1 byte thanks to @Neil _=>"a6h19äæ2ðøħŋœǁǃɐ10ɛ2ɞ8ɧ2ɪ13ɸ4ɽ2ʀ5ʈ11ʔ2ʘ2ʛ3ʟʡ2βθχᶑⱱ".replace(/.(\d+)/g,(c,n)=>[...Array(+n)].map(_=>String.fromCharCode(a++),a=c.charCodeAt()).join) Try it online! • Well, [...Array(+n)].map(_=>String.fromCharCode(a++),a=c.charCodeAt()).join saves a byte, I guess... – Neil Sep 24, 2020 at 18:25 # Python 3, 131 bytes a=0 n="\x01" for c in f"a\x01\x01\x01\x01\x01\x02{n*18}j\x02\x01 \x08/$\x08n\x02\x8d{n*9}\x02\x01\x02{n*7}\x02\x01\x02{n*12}\x02\x01\x01\x01\x02\x01\x02\x01\x01\x01\x01\x04{n*10}\x02\x01\x03\x01\x02\x01\x01\x02\x02\x01Đ\x06\x0f\u19ca\u0ee0":a+=ord(c);print(chr(a))

The string's characters have been encoded here for readability, but they are raw (1 byte each for all except the unicode) on TIO.

Try it online!

Simple idea: we can encode the characters as a set of deltas with some hand rolled run length encoding. I tried compression but the overhead is just too large.

We abuse the allowance for whitespace by printing each character on a separate line.

## Python 3.8 (pre-release), 152 bytes

for c,d in zip("ahäæðøħŋœǁǃɐɛɞɧɪɸɽʀʈʔʘʛʟʡβθχᶑⱱ",b"\x06\x13\x01\x02\x01\x01\x01\x01\x01\x01\x01\n\x02\x08\x02\n\x04\x02\x05\x0b\x02\x02\x03\x01\x02\x01\x01\x01\x01\x01"):print(*map(chr,range(k:=ord(c),k+d)))

Try it online!

• Isn't Python 3.8 already released? Sep 25, 2020 at 20:24
• @Justin yes, but on Try It Online (tio.run) it hasn't been changed yet Sep 26, 2020 at 8:51

# MATLAB, 62 chars, 95 bytes (UTF-8)

setxor([97:122,'äæçðøħŋœǁǃβθχᶑⱱ',592:674],'gɷɿɼɦɩɚɝʚʞʠʓʖʗʅʆʇ')

Outputs char array.
...or if we want lowest bytecount, not charcount:

## MATLAB, 71 chars, 88 bytes (UTF-8)

setxor([97:122,'äæçðøħŋœǁǃβθχᶑⱱ',592:674],['g',550+'47@CQVY_ampqtxz'])

# Jelly,  59  58 bytes

A niladic Link yielding a list of characters (or a full program printing them to STDOUT).

Try it online!

### How?

“#×2DHṬ“Ð“ƥ’ḃ2ż4,3F - Link: no arguments
“#×2DHṬ“Ð“ƥ’        - list of base 250 numbers = [35227363705935,4097,165]
ḃ2      - convert to bijective-base 2 = [[1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,2,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,2,1],[1,2,1,1,2,2,1]]
4,3  - [4,3]
ż     - zip together = [[[1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,2,1,1,1,1],4],[[1,1,1,1,1,1,1,1,1,1,2,1],3],[1,2,1,1,2,2,1]]
F - flatten = [1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,2,1,3,1,2,1,1,2,2,1]

“...“¡©Ð‘                      - lists of code-page indices = [[228,2,1,9,8,47,36,8,110,2,141],[0,6,15]]
j                     - join that (with the previous list) = [228,2,1,9,8,47,36,8,110,2,141,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,2,1,3,1,2,1,1,2,2,1,0,6,15]
272                 - 272
o                    - logical OR (replace the single 0 with 272)
⁽æe,⁽¿9         - [6602,3808]
;                - concatenate
Ä        - cumulative sums = [228,230,231,240,248,295,331,339,449,451,592,593,594,595,596,597,598,599,600,601,603,604,606,607,608,609,610,611,612,613,615,616,618,619,620,621,622,623,624,625,626,627,628,629,630,632,633,634,635,637,638,640,641,642,643,644,648,649,650,651,652,653,654,655,656,657,658,660,661,664,665,667,668,669,671,673,674,946,952,967,7569,11377]
Ọ       - cast to characters = "äæçðøħŋœǁǃɐɑɒɓɔɕɖɗɘəɛɜɞɟɠɡɢɣɤɥɧɨɪɫɬɭɮɯɰɱɲɳɴɵɶɸɹɺɻɽɾʀʁʂʃʄʈʉʊʋʌʍʎʏʐʑʒʔʕʘʙʛʜʝʟʡʢβθχᶑⱱ"
Øa    - lower-case English alphabet
;      - concatenate = "äæçðøħŋœǁǃɐɑɒɓɔɕɖɗɘəɛɜɞɟɠɡɢɣɤɥɧɨɪɫɬɭɮɯɰɱɲɳɴɵɶɸɹɺɻɽɾʀʁʂʃʄʈʉʊʋʌʍʎʏʐʑʒʔʕʘʙʛʜʝʟʡʢβθχᶑⱱabcdefghijklmnopqrstuvwxyz"
”g - 'g'
ḟ   - filter-discard = "äæçðøħŋœǁǃɐɑɒɓɔɕɖɗɘəɛɜɞɟɠɡɢɣɤɥɧɨɪɫɬɭɮɯɰɱɲɳɴɵɶɸɹɺɻɽɾʀʁʂʃʄʈʉʊʋʌʍʎʏʐʑʒʔʕʘʙʛʜʝʟʡʢβθχᶑⱱabcdefhijklmnopqrstuvwxyz"

# Stax, 70 bytes

Ç┼☺►┴┬φ3π╓ùδ±║≈§←¬b☻╬₧○ôT»╤↔ñ¢≤♣=≈î⌂╖ì(P┐Φ│xøïº9r═A,Åáï☼♀εwccù√╞Æ3äö▐π

Run and debug it

Run and debug it uncompressed

This is my first proper answer to a compression based question. Hope I did well.

Uses a combo of stax's number array compression and binary to print the alphabet.

## Explanation

Va'g-p Print the lowercase alphabet without g

")%EA&#!jA*E).'"! Deltas of first few symbols, compressed

228s+ add 228 to the beginning of it (first letter)

35141380471727:B 35141380471727 converted to array of bits

{2s-m subtract each bit from two

"1%%%%%%%%%%)%-%)%%))%6v9].,Q&kj"! deltas of last few symbols, compressed

++ join all the deltas together

:+ sums of all prefixes

p print, converting ASCII values

# Wolfram Language (Mathematica), 139 bytes

FromCharacterCode@Accumulate@Developer`RawUncompress@"xKd&FÅÄÈÉ¡¯ÂÇÔc+dBÕÂbAe111\.00¼£"<>"βθχᶑⱱ"&

Try it online! Pure function. Takes no arguments and returns a string as output. Note that the compressed string contains multiple unprintable characters. For reference, the shortest solution I could come up with that doesn't use built-in compression is 140 bytes long (ignore the Join::heads message):

Complement[CharacterRange@@@Join[97**122,228|231,592|644,648|674],Characters@"gåɚɝɦɩɷɼɿʓʖʗʚʞʠ"]<>"ðøħŋœǁǃβθχᶑⱱ"&