[PATCH 2/2] sms: Added comment about the gsm_7bit_alphabet table

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Mon Aug 12 12:08:18 UTC 2013


The table structure is not intuitive, so this comment shall aid to
understand this.
---
 src/gsm/gsm_utils.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index d76a5f2..5de4c4b 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -80,8 +80,12 @@
  * left out as they can't be handled with a char and
  * since most phones don't display or write these
  * characters this would only needlessly make the code
- * more complex
-*/
+ * more complex.
+ *
+ * Note that this table contains the latin1->7bit mapping _and_ has
+ * been merged with the reverse mapping (7bit->latin1) for the
+ * extended characters at offset 0x7f.
+ */
 static unsigned char gsm_7bit_alphabet[] = {
 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0xff, 0xff, 0x0d, 0xff,
 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-- 
1.7.9.5





More information about the OpenBSC mailing list