2006-04-18 13:07:42 +00:00
|
|
|
//
|
2018-02-09 14:39:42 +00:00
|
|
|
// Convert Windows-1252 (Latin-1) encoded text to the local encoding.
|
2006-04-18 13:07:42 +00:00
|
|
|
//
|
2021-02-16 10:23:45 +00:00
|
|
|
// Copyright 1998-2021 by Bill Spitzak and others.
|
2006-04-18 13:07:42 +00:00
|
|
|
//
|
2011-07-19 04:49:30 +00:00
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
|
//
|
2020-07-01 16:03:10 +00:00
|
|
|
// https://www.fltk.org/COPYING.php
|
2006-04-18 13:07:42 +00:00
|
|
|
//
|
2020-07-01 16:03:10 +00:00
|
|
|
// Please see the following page on how to report bugs and issues:
|
2006-04-18 13:07:42 +00:00
|
|
|
//
|
2020-07-01 16:03:10 +00:00
|
|
|
// https://www.fltk.org/bugs.php
|
2006-04-18 13:07:42 +00:00
|
|
|
//
|
|
|
|
|
|
2021-02-16 10:23:45 +00:00
|
|
|
#include <config.h>
|
2006-04-25 18:28:56 +00:00
|
|
|
#include <FL/fl_draw.H>
|
2016-04-13 14:05:34 +00:00
|
|
|
#include <FL/Fl.H>
|
2018-06-26 14:12:43 +00:00
|
|
|
#include "Fl_System_Driver.H"
|
2006-04-25 18:28:56 +00:00
|
|
|
#include <FL/Enumerations.H>
|
2006-04-18 13:07:42 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include "flstring.h"
|
|
|
|
|
|
2018-06-23 16:47:40 +00:00
|
|
|
/**
|
2018-06-23 20:50:22 +00:00
|
|
|
\cond DriverDev
|
|
|
|
|
\addtogroup DriverDeveloper
|
|
|
|
|
\{
|
2018-06-23 16:47:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
2018-06-23 20:50:22 +00:00
|
|
|
Default implementation of latin-to-local text conversion.
|
|
|
|
|
|
|
|
|
|
The default implementation returns the original text. This method should
|
|
|
|
|
be reimplemented by drivers for platforms that commonly use latin
|
|
|
|
|
text encoding.
|
|
|
|
|
|
|
|
|
|
\see fl_latin1_to_local(const char *, int)
|
2018-06-23 16:47:40 +00:00
|
|
|
*/
|
2016-04-13 14:05:34 +00:00
|
|
|
const char *Fl_System_Driver::latin1_to_local(const char *t, int)
|
2006-04-18 13:07:42 +00:00
|
|
|
{
|
|
|
|
|
return t;
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-23 16:47:40 +00:00
|
|
|
/**
|
2018-06-23 20:50:22 +00:00
|
|
|
Default implementation of local-to-latin text conversion.
|
2020-07-01 16:03:10 +00:00
|
|
|
|
2018-06-23 20:50:22 +00:00
|
|
|
The default implementation returns the original text. This method should
|
|
|
|
|
be reimplemented by drivers for platforms that commonly use latin
|
|
|
|
|
text encoding.
|
|
|
|
|
|
|
|
|
|
\see fl_local_to_latin1(const char *, int)
|
2018-06-23 16:47:40 +00:00
|
|
|
*/
|
2016-04-13 14:05:34 +00:00
|
|
|
const char *Fl_System_Driver::local_to_latin1(const char *t, int)
|
2006-04-18 13:07:42 +00:00
|
|
|
{
|
|
|
|
|
return t;
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-23 16:47:40 +00:00
|
|
|
/**
|
2018-06-23 20:50:22 +00:00
|
|
|
\}
|
|
|
|
|
\endcond
|
2018-06-23 16:47:40 +00:00
|
|
|
*/
|
|
|
|
|
|
2016-04-13 14:05:34 +00:00
|
|
|
const char *fl_latin1_to_local(const char *t, int n)
|
|
|
|
|
{
|
|
|
|
|
return Fl::system_driver()->latin1_to_local(t, n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *fl_local_to_latin1(const char *t, int n)
|
|
|
|
|
{
|
|
|
|
|
return Fl::system_driver()->local_to_latin1(t, n);
|
|
|
|
|
}
|