Strings.StrConvで全角に変換しようとする文字列にサロゲートペア文字が含まれていると"??"に変換されてしまいます。
Debug.WriteLine("𠀋=" + Strings.StrConv("𠀋", VbStrConv.Wide)); // 𠀋=??と表示される
「.NET Frameworkは文字列を内部的にUnicodeしており、標準機能のStrConvを使用しているからヨシ!」と思っていると失敗するので注意が必要です。
参考
Strings.StrConvで全角に変換しようとする文字列にサロゲートペア文字が含まれていると"??"に変換されてしまいます。
Debug.WriteLine("𠀋=" + Strings.StrConv("𠀋", VbStrConv.Wide)); // 𠀋=??と表示される
「.NET Frameworkは文字列を内部的にUnicodeしており、標準機能のStrConvを使用しているからヨシ!」と思っていると失敗するので注意が必要です。
参考
C:\> cd path\to\docroot C:\path\to\docroot> php -S 127.0.0.1:8080もしくは-tオプションでドキュメントルートを指定します。
C:\> php -S 127.0.0.1:8080 -t C:\path\to\docroot
try {
// ob_startなどは、file_get_contentsだけで処理を完結させるために使用。
ob_start();
$image = file_get_contents($path);
$warning = ob_get_contents();
ob_end_clean();
if (strlen($warning) > 0) {
throw new \Exception($waring);
}
} catch (\Exception $e) {
// エラー処理
}
int x = null; // コンパイルエラー
Dim x As Integer = Nothing ' x = 0
Public Shared Sub Main()
Dim n As Integer = Nothing
' コンパイルエラー(VBNC30020)
' If n Is Nothing Then
' Console.WriteLine("n is Nothing")
' End If
If n = Nothing Then
Console.WriteLine("n equals Nothing")
End If
If IsNothing(n) Then
Console.WriteLine("isNothing n")
End If
If n = 0 Then
Console.WriteLine("n equals zero")
End If
End Sub
' 実行結果
' n equals Nothing
' n equals zero
filter Get-Shortcut()
{
$shell = New-Object -ComObject WScript.Shell
return $shell.CreateShortcut($_.FullName)
}