util_charset.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. * @file util_charset.h
  18. * @brief charset conversion
  19. *
  20. * @defgroup APACHE_CORE_CHARSET Charset Conversion
  21. * @ingroup APACHE_CORE
  22. *
  23. * These are the translation handles used to translate between the network
  24. * format of protocol headers and the local machine format.
  25. *
  26. * For an EBCDIC machine, these are valid handles which are set up at
  27. * initialization to translate between ISO-8859-1 and the code page of
  28. * the source code.\n
  29. * For an ASCII machine, they are undefined.
  30. *
  31. * @see ap_init_ebcdic()
  32. * @{
  33. */
  34. #ifndef APACHE_UTIL_CHARSET_H
  35. #define APACHE_UTIL_CHARSET_H
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. #include "apr.h"
  40. #if APR_CHARSET_EBCDIC || defined(DOXYGEN)
  41. #include "apr_xlate.h"
  42. /**
  43. * On EBCDIC machine this is a translation handle used to translate the
  44. * headers from the local machine format to ASCII for network transmission.
  45. * @note On ASCII system, this variable does <b>not</b> exist.
  46. * So, its use should be guarded by \#if APR_CHARSET_EBCDIC.
  47. */
  48. extern apr_xlate_t *ap_hdrs_to_ascii;
  49. /**
  50. * On EBCDIC machine this is a translation handle used to translate the
  51. * headers from ASCII to the local machine format after network transmission.
  52. * @note On ASCII system, this variable does <b>not</b> exist.
  53. * So, its use should be guarded by \#if APR_CHARSET_EBCDIC.
  54. */
  55. extern apr_xlate_t *ap_hdrs_from_ascii;
  56. #endif /* APR_CHARSET_EBCDIC */
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #endif /* !APACHE_UTIL_CHARSET_H */
  61. /** @} */