Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
877f16e5
Commit
877f16e5
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
IDN: Gisle Vanem made the win32 version handle a missing CHARSET environment
and then figure it out with a suitable windows call.
parent
fbe1fa9d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/easy.c
+27
-1
27 additions, 1 deletion
lib/easy.c
with
27 additions
and
1 deletion
lib/easy.c
+
27
−
1
View file @
877f16e5
...
...
@@ -66,7 +66,7 @@
#include
<sys/select.h>
#endif
#endif
#endif
/* WIN32 ... */
#include
"urldata.h"
#include
<curl/curl.h>
...
...
@@ -138,6 +138,28 @@ static CURLcode win32_init(void) { return CURLE_OK; }
static
void
win32_cleanup
(
void
)
{
}
#endif
#ifdef USE_LIBIDN
/*
* Initialise use of IDNA library.
* It falls back to ASCII if $CHARSET isn't defined. This doesn't work for
* idna_to_ascii_lz().
*/
static
void
idna_init
(
void
)
{
#ifdef WIN32
char
buf
[
60
];
UINT
cp
=
GetACP
();
if
(
!
getenv
(
"CHARSET"
)
&&
cp
>
0
)
{
snprintf
(
buf
,
sizeof
(
buf
),
"CHARSET=cp%u"
,
cp
);
putenv
(
buf
);
}
#else
/* to do? */
#endif
}
#endif
/* USE_LIBIDN */
/* true globals -- for curl_global_init() and curl_global_cleanup() */
static
unsigned
int
initialized
=
0
;
static
long
init_flags
=
0
;
...
...
@@ -163,6 +185,10 @@ CURLcode curl_global_init(long flags)
return
CURLE_FAILED_INIT
;
#endif
#ifdef USE_LIBIDN
idna_init
();
#endif
initialized
=
1
;
init_flags
=
flags
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment