kerframil 1532761785 learn Where LC_CTYPE is set to a UTF-8 enabled locale, ${#var} will count its codepoints. To count graphemes with column from >=util-linux-2.30: var='piñón'; IFS= read -r length < <(printf '%s\n' _ "$var" | column -tR1); echo "there are ${#var} codepoints and ${#length} graphemes" kerframil 1532761878 forget kerframil 1532761887 learn Where LC_CTYPE is set to a UTF-8 enabled locale, ${#var} will count its codepoints. To count graphemes with column from >=util-linux-2.30: var='piñón'; IFS= read -r length < <(printf '%s\n' _ "$var" | column -tR1); echo "var has ${#var} codepoints and ${#length} graphemes"